multiple user roles/domains
Earlier this week I set up a machine with multiple user domains and matching roles.
This was a lot harder than it should be.
I had to change ldconfig.te, login.te, newrole.te, postfix.te, sshd.te, and xdm.te to list the new domains, and I had to change the rbac file to allow role transitions. Also I had to define new types for files under /home.
Next I plan to do the following:
Have a "user_type" attribute on user_t and every similar domain, and have the .te files listed above refer to "user_type" instead of "user_t" wherever possible.
For the rbac file I'm not sure how I can solve it without having to edit that file separately in addition to modifying user.te for the new domains and roles.
Now for /home, I was thinking of having home_root_t, $1_home_dir_t (user_home_dir_t) for the main ~user directory, and $1_home_t (user_home_t) for the files and directories under ~user. This means that when I want to give a web server access to ~user/www I can grant it access to search user_home_dir_t and r_dir_file() access to user_home_www_t.
What do you think?
Signature · 3 lines
I do not get viruses because I do not use MS software. If you use Outlook then please do not put my email address in your address-book so that WHEN you get a virus it won't use my address in the
Quoted 1 line
From field.
--
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 · Russell Coker
Next I plan to do the following:
Have a "user_type" attribute onuser_tand every similar domain, and have the .te files listed above refer to "user_type" instead of "user_t" wherever possible.
There is already a 'userdomain' type attribute on user_t and sysadm_t that is used in a number of rules, although not everywhere it could be. While using it more pervasively would be helpful, there are likely to be cases where you do not want all of your user domains to be included in such rules.
Quoted 3 lines
For the rbac file I'm not sure how I can solve it without having to edit that file separately in addition to modifying user.te for the new domains and roles.
Role allow rules don't have to be centralized in rbac, but it seems preferable to keep them there.
Quoted 5 lines
Now for /home, I was thinking of having
home_root_t, $1_home_dir_t (user_home_dir_t) for the main ~user directory, and $1_home_t (user_home_t) for the files and directories under ~user. This means that when I want to give a web server access to ~user/www I can grant it access to searchuser_home_dir_tandr_dir_file()access touser_home_www_t.
This seems reasonable.
--
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.