Skip to contentSkip to conversation

Where does semanage store changes?

DISCUSSION dE 2 participants 3 messages Jul 13, 2014 – Jul 16, 2014 SELinux security module

lore
Share & tools
lore

dE

author
#0 lore raw

Except when deleting and adding modules (when the main policy binary changes; did a checksum to verify that), where are other changes which semanage makes (like change boolean values, users, port, interface, node) stored?

#1 lore raw
Quoted 4 lines · dE

Except when deleting and adding modules (when the main policy binary changes; did a checksum to verify that), where are other changes which semanage makes (like change boolean values, users, port, interface, node) stored?

Ultimately all of the changes you listed have to be stored in the kernel policy binary since they are part of the kernel policy (unlike, for example, semanage fcontext or login mappings). However, they are also kept in separate configuration files under /etc/selinux/$SELINUXTYPE/modules/active and merged into the generated kernel policy after linking and expanding the policy modules together. Non-kernel configurations such as fcontext or login mappings are stored in their own respective files, e.g. file_contexts.local and seusers.

author
#2 lore raw
Quoted 5 lines · Stephen Smalley
Quoted 4 lines · dE

Except when deleting and adding modules (when the main policy binary changes; did a checksum to verify that), where are other changes which semanage makes (like change boolean values, users, port, interface, node) stored?

Quoted 10 lines

Ultimately all of the changes you listed have to be stored in the kernel policy binary since they are part of the kernel policy (unlike, for example, semanage fcontext or login mappings). However, they are also kept in separate configuration files under /etc/selinux/$SELINUXTYPE/modules/active and merged into the generated kernel policy after linking and expanding the policy modules together. Non-kernel configurations such as fcontext or login mappings are stored in their own respective files, e.g. file_contexts.local and seusers.

Yes, semodule -B merges those changes making active directory empty.

However, semange still remembers the changes it made (using -E).

Thanks for the clarification.