A good place to start?
I've just finished installing a new Debian system and decided to put SELinux onto it. After getting the programs installed, the kernel recompiled, the filesystem relabeled and the policy reloaded, I now have a few questions I want to ask about what to do next:
- how do I allow domain transitions from user_r to sysadm_r? I keep getting the "user_u:sysadm_r:sysadm_t is not a valid context" error, even though /etc/selinux/refpolicy-strict/users/local.users AND /etc/selinux/refpolicy-strict/src/policy/config/local.users contain the following line:
user user roles { user_r sysadm_r };
- where should I start editing policy files to remove the various avc:
denied errors I get when starting the machine? At the moment, there are quite a few - most of which occur in the system_u:system_r:initrc_t context. Should I begin there?
- out of the various GUI-based policy editors out there, which ones are good for SELinux newbies?
TIA,
Brad
Signature · 6 lines
CONTROL YOUR TABS: https://addons.mozilla.org/extensions/158 -- 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.
Quoted 4 lines · Bradley Chapman
I've just finished installing a new Debian system and decided to put SELinux onto it. After getting the programs installed, the kernel recompiled, the filesystem relabeled and the policy reloaded, I now have a few questions I want to ask about what to do next:
What version of Debian? What SELinux packages? Modular/managed policy or monolithic policy?
Quoted 7 lines
- how do I allow domain transitions from
user_rtosysadm_r? I keep getting the "user_u:sysadm_r:sysadm_t is not a valid context" error, even though/etc/selinux/refpolicy-strict/users/local.usersAND/etc/selinux/refpolicy-strict/src/policy/config/local.userscontain the following line:user user roles {
user_rsysadm_r};
That isn't what you want to do. First, user_u is a fallback for unprivileged users not otherwise identified in policy - you don't want to grant it access to sysadm_r. Second, for users who should be authorized for sysadm_r, you want to make their default role staff_r so that they are protected from user_r users. staff_r should already be authorized to transition to sysadm_r.
/etc/selinux/$P/users/local.users is also deprecated as a way of defining local users in SELinux. You should be using seusers (if Debian supports that, which is unclear to me - check their pam_selinux to see if it calls getseuserbyname() - if not, someone needs to file updated SELinux patches for Debian), and using semanage to manage such user mappings.
Quoted 4 lines
- where should I start editing policy files to remove the various avc:
denied errors I get when starting the machine? At the moment, there are quite a few - most of which occur in the system_u:system_r:initrc_t context. Should I begin there?
Are they actually denials from direct commands by the rc scripts, or from daemons erroneously left in the calling domain due to lack of a defined domain or proper domain transition rule?
Quoted 2 lines
- out of the various GUI-based policy editors out there, which ones are good for SELinux newbies?
SLIDE has the best integration with reference policy.
SEEdit is the most oriented toward ease of use, but I believe that it requires you to convert over entirely to its own simplified policy, and it makes tradeoffs between quality of protection and ease of use.
Perhaps the better question is which ones do you find helpful?
Signature · 8 lines
Stephen Smalley National Security Agency -- 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.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Mr. Smalley,
Quoted 8 lines · Stephen Smalley
Quoted 4 lines · Bradley Chapman
I've just finished installing a new Debian system and decided to put SELinux onto it. After getting the programs installed, the kernel recompiled, the filesystem relabeled and the policy reloaded, I now have a few questions I want to ask about what to do next:
What version of Debian? What SELinux packages? Modular/managed policy or monolithic policy?
Debian unstable/main, using the mainline SELinux packages and a monolithic policy.
Quoted 7 lines
Quoted 7 lines
- how do I allow domain transitions from
user_rtosysadm_r? I keep getting the "user_u:sysadm_r:sysadm_t is not a valid context" error, even though/etc/selinux/refpolicy-strict/users/local.usersAND/etc/selinux/refpolicy-strict/src/policy/config/local.userscontain the following line:
Quoted 8 lines
Quoted 1 line
user user roles {
user_rsysadm_r};That isn't what you want to do. First,
user_uis a fallback for unprivileged users not otherwise identified in policy - you don't want to grant it access tosysadm_r. Second, for users who should be authorized forsysadm_r, you want to make their default rolestaff_rso that they are protected fromuser_rusers.staff_rshould already be authorized to transition tosysadm_r.
Ah. Most of the newbie setup stuff I came across seemed to suggest that this was the way to allow users to transition to sysadm_r from user_r. I'll make the change and try again.
Quoted 7 lines
/etc/selinux/$P/users/local.usersis also deprecated as a way of defining local users in SELinux. You should be using seusers (if Debian supports that, which is unclear to me - check theirpam_selinuxto see if it callsgetseuserbyname()- if not, someone needs to file updated SELinux patches for Debian), and using semanage to manage such user mappings.
This is something that does indeed confuse me, which is undoubtedly why you asked after the packages I'm using - there seems to be multiple ways to configure things within the policy directories under /etc/selinux.
Quoted 9 lines
Quoted 5 lines
- where should I start editing policy files to remove the various avc:
denied errors I get when starting the machine? At the moment, there are quite a few - most of which occur in the system_u:system_r:initrc_t context. Should I begin there?Are they actually denials from direct commands by the rc scripts, or from daemons erroneously left in the calling domain due to lack of a defined domain or proper domain transition rule?
They seem to be a mixture of both. Is there an easy way of separating the two so that I can concentrate on one or the other?
Quoted 11 lines
Quoted 3 lines
- out of the various GUI-based policy editors out there, which ones are good for SELinux newbies?
SLIDE has the best integration with reference policy.
SEEdit is the most oriented toward ease of use, but I believe that it requires you to convert over entirely to its own simplified policy, and it makes tradeoffs between quality of protection and ease of use.
Perhaps the better question is which ones do you find helpful?
At the moment, anything which makes it easy to edit the policy would be helpful. Since I'm starting with the reference policy I guess I will try SLIDE.
Brad
Signature · 6 lines
CONTROL YOUR TABS: https://addons.mozilla.org/extensions/158 -- 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.