Skip to contentSkip to conversation

Remove types from policy and filesystem

DISCUSSION Stephen D. Smalley 1 participant 1 message Dec 4, 2002 SELinux security module

lore
Share & tools
lore
#0 lore raw
Quoted 4 lines

after I remove a type from the policy and reload the policy I get an error about the unkown (removed) type. I'm sure that I don't have labeled files with this type at this time.

What exactly is the error that you see? The kernel should report that it is invalidating any SIDs that have the type in their security context when you reload the policy, but that is just informational, not an error. The kernel used to report when an invalid context was found in the persistent label mapping when the filesystem was mounted, but that was disabled a while back, since it can occur normally due to policy changes, as in this case.

Quoted 3 lines

It is possible to remove types from the security context database of the filesystem, without erase the "...security" directory and complette rebuild of the database? I am not sure but I think a "make reset" don't helps.

'make reset' recreates the persistent label mapping on the filesystem from scratch, so it does purge invalid contexts. If you make massive changes to the policy, then it might be appropriate. Otherwise, it really isn't necessary.

--
Stephen Smalley, NSA
[email protected]

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.