Skip to contentSkip to conversation

login roles

DISCUSSION Timothy Wood 2 participants 2 messages Jan 27, 2004 – Jan 28, 2004 SELinux security module

lore
Share & tools
lore
#0 lore raw

I set the pam_selinux module to multiple and now I'm seeing three roles instead of the two defined in policy/users. The third context is <username>:staff_r:system_chkpwd_t, is this normal? I diffed my current policy against the 1.4 tarball from the NSA site and the only differences are a couple of changes I've made for slackware. Of those few changes none of them have anything to do with system_chkpwd_t.

Timothy,

--
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.

#1 lore raw
Quoted 6 lines · Timothy Wood

I set the pam_selinux module to multiple and now I'm seeing three roles instead of the two defined in policy/users. The third context is <username>:staff_r:system_chkpwd_t, is this normal? I diffed my current policy against the 1.4 tarball from the NSA site and the only differences are a couple of changes I've made for slackware. Of those few changes none of them have anything to do with system_chkpwd_t.

This is due to the fact that system_chkpwd_t is authorized for <username>:staff_r and is also reachable from the login domains to perform authentication, so that context is reachable (but not enterable via the user shell, so it won't actually work when in enforcing mode). I've tightened the constraints to reduce this problem, but we may need to change the getconlist logic to check entrypoint access to the shell as well to fully address it. My patch to the policy/constraints file is attached, and this change is in the sourceforge CVS tree.

Signature · 2 lines
Stephen Smalley <[email protected]>
National Security Agency

Index: policy/constraints
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/constraints,v retrieving revision 1.2
retrieving revision 1.4

constraints +6 -2
diff -u -r1.2 -r1.4
@@ -34,14 +34,18 @@
 #
 
 constrain process transition
-	( u1 == u2 or t1 == privuser
+	( u1 == u2 or ( t1 == privuser and t2 == userdomain )
 ifdef(`crond.te', `
          or (t1 == crond_t and t2 == user_crond_domain)
 ')
         );
 
 constrain process transition 
-	( r1 == r2 or t1 == privrole) ;
+	( r1 == r2 or ( t1 == privrole and t2 == userdomain )
+ifdef(`crond.te', `
+         or (t1 == crond_t and t2 == user_crond_domain)
+')
+        );
 
 #
 # Restrict the ability to label objects with other