mirror of
https://github.com/SELinuxProject/selinux
synced 2025-01-29 00:32:46 +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> |
||
---|---|---|
checkpolicy | ||
libselinux | ||
libsemanage | ||
libsepol | ||
policycoreutils | ||
scripts | ||
sepolgen | ||
.gitignore | ||
Makefile |