: clarify the file_contexts.subs_dist configuration file usage
PATCH 1/1 : clarify the file_contexts.subs_dist configuration file usage
Hello Sven.
Quoted 12 lines · Guido Trentalancia
Quoted 10 lines
Quoted 6 lines
This seems to break policycoreutils:
# semanage fcontext -l /usr/sbin/semanage: too many values to unpack (expected 2)Undoing the comment change fixes things again.
Is semanage using the standard library functions to read the file ? Because I had a very quick look through the library and the #-comment skipping code seemed to be there...
Quoted 8 lines
fd =
open(selinux.selinux_file_context_subs_dist_path(), "r")for i infd.readlines():
target, substitute =i.split()self.equiv_dist[target] = substitute
fd.close()Just opens the file, reads lines and assumes there are always two values (target & substitute) on each line. This is from
seobject.py.
You're right, I told you fibbs in my previous message.
seobject.py is buggy for it does not skip comments.
It needs to be patched, otherwise, as you noted, "semanage fcontext -l" does not work.
Regards,
Guido