Domain transition -- enabling user_r in eklogin
Quoted 12 lines
For which I've been having problems getting an appropriate transition working. (the following may have some typos I don't have either box running just now to refer to)
The
remote_logindomain was clearly designed with telnet in mind, there is no transtion to user_u:user_r.Looking this over I moved login.krb5 into the same SID as
/bin/login, using login.te as an example, however once the user's successfully authenticated the domain remains system_u:system_r and 'newrole(1)' is not available.
Quoted 6 lines
I'm going somewhat from memory so there may be some missed details, however I've tried re-configuring several times without much luck.
Also this test is being done on a slackware setup, because I was able to get telnetd working in a redhat system more easily there may be some system layout issues causing problems, not sure yet.
The example policy includes rules to transition from inetd_t or tcpd_t to rlogind_t upon executing a file labeled with the rlogind_exec_t type (assigned to in.rlogind and in.telnetd in the file contexts configuration), and to transition from rlogind_t to remote_login_t upon executing a file labeled with the login_exec_t type (assigned to login in the file contexts configuration). The remote_login_t domain can then transition to user_t, at which point the user can run newrole if the user has an entry in the policy/users file and is authorized for any other roles. If the user lacks an entry in the policy/users file and you retain the user_u entry in policy/users, then the user will be mapped to the generic user_u identity for the SELinux security context and will be limited to operating in user_r.
--
Stephen Smalley, NSA
[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.
On Tue, 17 Dec 2002 11:14:38 -0500 (EST) (unchecked - local sync NTPstrat4) "Stephen D. Smalley" <[email protected]> did inscribe thusly:
fw:
Quoted 5 lines
Quoted 4 lines
Also this test is being done on a slackware setup, because I was able to get telnetd working in a redhat system more easily there may be some system layout issues causing problems, not sure yet.
"Stephen D. Smalley" <[email protected]>
Quoted 12 lines
The example policy includes rules to transition from
inetd_tortcpd_ttorlogind_tupon executing a file labeled with therlogind_exec_ttype (assigned to in.rlogind and in.telnetd in the file contexts configuration), and to transition fromrlogind_ttoremote_login_tupon executing a file labeled with thelogin_exec_ttype (assigned to login in the file contexts configuration). Theremote_login_tdomain can then transition touser_t, at which point the user can run newrole if the user has an entry in the policy/users file and is authorized for any other roles. If the user lacks an entry in the policy/users file and you retain theuser_uentry in policy/users, then the user will be mapped to the genericuser_uidentity for the SELinux security context and will be limited to operating inuser_r.
Stephen, Ok, I see you're right, I'd thought that this: (login.te) --
# Only permit unprivileged user domains to be entered via rlogin,
# since very weak authentication is used. domain_trans(remote_login_t, shell_exec_t, unpriv_userdomain) --
was the source of the behavior, that wasn't it, local console login was also broken and like an idiot I hadn't connected this, on console login also, the context is system_u:system_r and I get the following messages:
avc: denied { ioctl } for pid=142 exe=/bin/bash path=/dev/tty1 dev=08:02 ino=22757 scontext=system_u:system_r:user_t tcontext=system_u:object_r:tty_device_t tclass=chr_file
avc: denied { ioctl } for pid=142 exe=/bin/bash path=/dev/tty1 dev=08:02 ino=22757 scontext=system_u:system_r:user_t tcontext=system_u:object_r:tty_device_t tclass=chr_fileThose failures kill the shell in enforcing mode of course.
so some transition in the local_login domain is missing, I'll try to dig out the root of that problem. ssh login is working fine on the slackware installation.
forrest
Quoted 3 lines
--
Stephen Smalley, NSA
[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.