Skip to contentSkip to conversation

setuid/setgid capability

DISCUSSION Russell Coker 2 participants 2 messages Sep 23, 2002 SELinux security module

lore
Share & tools
lore
#0 lore raw

Why does user_t need setuid and setgid capabilities?

So far in a quick examination of my system it seems that the man-db package wants setuid capability, but works OK without it except as root (as root it calls setuid() repeatedly trying in vain to change it's UID and puts lots of entries in the syslog). Of the things I use gpg, su, passwd, etc also need root, but they all have different domains which allow setuid capability.

For setgid the games want it, so I could remove that access at the cost of losing access to high scores. But there's probably less reason to deny setgid and more potential benefits.

Perhaps the default policy should be changed to deny setuid access to user_t and to have a comment suggesting that setgid is a candidate for removal?

If we remove setuid then we can also probably remove dac_override and net_bind_service as neither of them even apply if you are not root, and if you are root but not sysadm_r then you probably don't deserve them.

Steve was talking about removing sys_tty_config. So we might have only { setgid chown fowner } as the capabilities for user_t then.

Russell Coker

--
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 1 line · Russell Coker

Why does user_t need setuid and setgid capabilities?

I think that this is mostly historical, to support execution of certain setuid/setgid programs from user_t without performing a domain transition. I agree that we can likely remove many of the user_t capabilities and then set up new domains as necessary for particular programs. We should also review all program domains that can be reached from user_t to see if we can also eliminate unnecessary capabilities from programs over which the user has control.

--
Stephen D. Smalley, NAI Labs
[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.