Bug 1126405

Summary: Inform user when adding existing item in lockdown whitelist (Command, Context, Uid, User)
Product: [Fedora] Fedora Reporter: Jakub Jelen <jjelen>
Component: firewalldAssignee: Thomas Woerner <twoerner>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jpopelka, twoerner
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-04 13:28:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1017034    

Description Jakub Jelen 2014-08-04 11:01:44 UTC
Description of problem:
There is no warning or error when user tries to add new command to lockdown whitelist and this command is there already present.

This method should fail or at least warn user that this item is already in this list.

Version-Release number of selected component (if applicable):
git upstream

How reproducible:
deterministic

Steps to Reproduce:
1. firewall-cmd --add-lockdown-whitelist-command=/bin/bash
  (success)
2. firewall-cmd --add-lockdown-whitelist-command=/bin/bash

Actual results:
  (success)

Expected results:
warn or fail

Additional info:
This is applicable for all Command, Context, User and Uid whitelists.