mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-14 01:54:42 +00:00
622ebe0994
When calling "sepolicy transition", a KeyError exception occurred: ~# sepolicy transition -s sysadm_t -t portage_t Traceback (most recent call last): File "/usr/bin/sepolicy-2.7", line 465, in <module> args.func(args) File "/usr/bin/sepolicy-2.7", line 309, in transition mytrans.output() File "/usr/lib64/python2.7/site-packages/sepolicy/transition.py", line 76, in output print self.out(self.source) File "/usr/lib64/python2.7/site-packages/sepolicy/transition.py", line 72, in out buf+= self.out(x, seen, "%s%s ... " % (header, name)) File "/usr/lib64/python2.7/site-packages/sepolicy/transition.py", line 67, in out for t in self.sdict[name]["map"]: KeyError: 'map' By updating the code to first check if the "map" key is known to the dictionary (and only then executing the mentioned code) this error is no longer prevalent: ~# sepolicy transition -s sysadm_t -t portage_t sysadm_t @ portage_exec_t --> portage_t sysadm_t ... dhcpc_t ... initrc_t ... puppet_t @ portage_exec_t --> portage_t sysadm_t ... dhcpc_t ... initrc_t ... puppet_t ... portage_fetch_t @ portage_exec_t --> portage_t sysadm_t ... dhcpc_t ... initrc_t ... crond_t @ portage_exec_t --> portage_t sysadm_t ... dhcpc_t ... initrc_t ... crond_t ... system_cronjob_t @ portage_exec_t --> portage_t Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be> |
||
---|---|---|
.. | ||
sepolicy | ||
.gitignore | ||
common.h | ||
info.c | ||
Makefile | ||
policy.c | ||
policy.h | ||
search.c | ||
sepolicy-bash-completion.sh | ||
sepolicy-booleans.8 | ||
sepolicy-communicate.8 | ||
sepolicy-generate.8 | ||
sepolicy-interface.8 | ||
sepolicy-manpage.8 | ||
sepolicy-network.8 | ||
sepolicy-transition.8 | ||
sepolicy.8 | ||
sepolicy.py | ||
setup.py |