mirror of
https://github.com/SELinuxProject/selinux
synced 2025-03-11 04:37:29 +00:00
python/semanage: Allow modifying records on "add"
When trying to add a record with a key that already exists, modify the existing record instead. Also, fix "semanage -m -e" (add_equal was called instead of modify_equal), which meant that existing local equivalency couldn't be modified (though a user could remove it and add a modified equivalency). Fixes: https://github.com/SELinuxProject/selinux/issues/412 When a port or login definition present in the policy is modified using "semanage port -m", "semanage export" exports the command as "port -a" instead of "port -m". This results in "semanage import" failing (port already defined). The same is true for port, user, login, ibpkey, ibendport, node, interface and fcontext. Signed-off-by: Vit Mojzis <vmojzis@redhat.com> Acked-by: James Carter <jwcart2@gmail.com>
This commit is contained in:
parent
1a3d58945b
commit
f5d4b60e69