selinux/python/semanage
Vit Mojzis f5d4b60e69 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>
2024-03-04 09:57:53 -05:00
..
Makefile Do not automatically install Russian translations 2023-08-16 13:33:47 -04:00
semanage python/semanage: Allow modifying records on "add" 2024-03-04 09:57:53 -05:00
semanage-bash-completion.sh semanage bash completion: handle semanage module 2020-06-09 15:44:07 -04:00
semanage-boolean.8 python/semanage: Improve man pages 2023-05-11 09:22:40 +02:00
semanage-dontaudit.8 python/semanage: Improve man pages 2023-05-11 09:22:40 +02:00
semanage-export.8 python/semanage: Improve man pages 2023-05-11 09:22:40 +02:00
semanage-fcontext.8 python/semanage: Improve man pages 2023-05-11 09:22:40 +02:00
semanage-ibendport.8 python/semanage: Improve man pages 2023-05-11 09:22:40 +02:00
semanage-ibpkey.8 python/semanage: Improve man pages 2023-05-11 09:22:40 +02:00
semanage-import.8 python/semanage: Improve man pages 2023-05-11 09:22:40 +02:00
semanage-interface.8 python/semanage: Improve man pages 2023-05-11 09:22:40 +02:00
semanage-login.8 python/semanage: Improve man pages 2023-05-11 09:22:40 +02:00
semanage-module.8 python/semanage: Improve man pages 2023-05-11 09:22:40 +02:00
semanage-node.8 python/semanage: Improve man pages 2023-05-11 09:22:40 +02:00
semanage-permissive.8 python/semanage: Improve man pages 2023-05-11 09:22:40 +02:00
semanage-port.8 python/semanage: Improve man pages 2023-05-11 09:22:40 +02:00
semanage-user.8 python/semanage: Improve man pages 2023-05-11 09:22:40 +02:00
semanage.8 python/semanage: Examples are no longer in the main semanage man page 2019-02-04 22:11:26 +01:00
seobject.py python/semanage: Allow modifying records on "add" 2024-03-04 09:57:53 -05:00
test-semanage.py semanage/test-semanage.py: Return non-zero value when some of unittest tests fail 2020-05-13 11:11:23 +02:00