Transition from RBAC to MLS
Hello!
We have a system we set up with the default configuration files, which use only RBAC. I'm now trying to rebuild the kernel with MLS enabled, but I'm running into a problem. I hope someone here can help. (If it matters, this was built on top of Red Hat 6.1.)
First, I edited policy/mls and created policy/fs_contexts.mls, initial_sid_contexts.mls, net_contexts.mls, and users.mls with some default values. Then (going from the directions in
http://www.nsa.gov/selinux/doc/install.html) I ran the scripts in the tools directory (enabling MLS in the security options menu) and removed all the ...security directories. When I rebooted, the kernel panicked because /ss_policy did not have MLS but the kernel did. I also tried booting without any /ss_policy file (figuring I could build it later, like the ...security directories), but that caused a panic, as well.
After doing some digging, I tried to create an MLS /ss_policy file by editing policy/Makefile and setting "CONFIG_FLASK_MLS" to "y." Then I ran "make install" from that directory, but checkpolicy complained that it found MLS definitions in the policy.conf file! This is where I got confused - shouldn't checkpolicy have been compiled with MLS support when I built the kernel and apps before those reboots?
Has anyone else ever taken a RBAC build and transitioned it to MLS? Am I missing something simple?
Thanks for any help,
-Steve
--
Steve Marting, Senior Associate Software Engineer
Progeny Systems Corp., Manassas, VA (World HQ)
703-368-6107 x162 -=#=- [email protected]
--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 4 lines · Steve
We have a system we set up with the default configuration files, which use only RBAC. I'm now trying to rebuild the kernel with MLS enabled, but I'm running into a problem. I hope someone here can help. (If it matters, this was built on top of Red Hat 6.1.)
As mentioned in the help for the CONFIG_FLASK_MLS option, we haven't configured the MLS policy for use yet, so we don't recommend enabling it. But if you really want to do so, here is what is needed in addition to enabling CONFIG_FLASK_MLS in the kernel configuration:
1) If you've previously built a non-MLS configuration, you need to remove the old checkpolicy program and its object files (*.cp.o) from kernel-2.4/security and rebuild them. The dependencies for the checkpolicy object files don't get generated by make dep, so it doesn't automatically notice that it needs to rebuild that program when you change the kernel configuration.
2) As you realized, you need to set CONFIG_FLASK_MLS to y in policy/Makefile. When you subsequently perform a 'make', if you haven't already created your own .mls configuration files, it should generate some defaults from the existing files by simply adding an unclassified attribute for security contexts and users.
--
Stephen D. Smalley, NAI Labs
[email protected]
--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
I forgot to mention that you also need to rebuild libsecure after enabling the MLS configuration option (because the get_user_sid function has conditional code to allow the user to specify a MLS level) and relink the modified login program to use the updated libsecure. You then need to create a /etc/security/default_context.mls file using the same format as the /etc/security/default_context file except for the addition of the MLS level attribute.
--
Stephen D. Smalley, NAI Labs
[email protected]
Quoted 12 lines · Stephen Smalley
As mentioned in the help for the
CONFIG_FLASK_MLSoption, we haven't configured the MLS policy for use yet, so we don't recommend enabling it. But if you really want to do so, here is what is needed in addition to enablingCONFIG_FLASK_MLSin the kernel configuration:1) If you've previously built a non-MLS configuration, you need to remove the old checkpolicy program and its object files (*.cp.o) from kernel-2.4/security and rebuild them. The dependencies for the checkpolicy object files don't get generated by make dep, so it doesn't automatically notice that it needs to rebuild that program when you change the kernel configuration.
Quoted 5 lines
2) As you realized, you need to set
CONFIG_FLASK_MLSto y in policy/Makefile. When you subsequently perform a 'make', if you haven't already created your own .mls configuration files, it should generate some defaults from the existing files by simply adding an unclassified attribute for security contexts and users.
--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.