Skip to contentSkip to conversation

rlogin policy patch

PATCH Russell Coker 2 participants 2 messages Oct 1, 2002 SELinux security module

lore
Share & tools
lore
#0 lore raw

I've attached a patch for the Debian telnetd setup. In Debian telnetd runs a SUID root wrapper for calling /bin/login so that telnetd can be run as non-root.

For running with SE Linux it's easiest to just run telnetd as root (to deny inetd setuid capability) but it still calls the wrapper by default anyway.

This patch allows that use, and doesn't give any significant extra access, so I think it is worthy of inclusion in the CVS.

Signature · 4 lines
http://www.coker.com.au/selinux/   My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/  Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/    Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/  My home page
domains/program/rlogind.te +3 -0
diff -ru default/domains/program/rlogind.te current/domains/program/rlogind.te
@@ -15,6 +15,9 @@
 domain_auto_trans(inetd_t, rlogind_exec_t, rlogind_t)
 domain_auto_trans(tcpd_t, rlogind_exec_t, rlogind_t)
 
+# for /usr/lib/telnetlogin
+can_exec(rlogind_t, rlogind_exec_t)
+
 type rlogind_tmp_t, file_type, sysadmfile, tmpfile;
 file_type_auto_trans(rlogind_t, tmp_t, rlogind_tmp_t)
 
file_contexts/program/rlogind.fc +1 -0
diff -ru default/file_contexts/program/rlogind.fc current/file_contexts/program/rlogind.fc
@@ -1,3 +1,4 @@
 # rlogind and telnetd
 /usr/sbin/in.rlogind		system_u:object_r:rlogind_exec_t
 /usr/sbin/in.telnetd		system_u:object_r:rlogind_exec_t
+/usr/lib/telnetlogin		system_u:object_r:rlogind_exec_t
#1 lore raw
Quoted 9 lines · Russell Coker

I've attached a patch for the Debian telnetd setup. In Debian telnetd runs a SUID root wrapper for calling /bin/login so that telnetd can be run as non-root.

For running with SE Linux it's easiest to just run telnetd as root (to deny inetd setuid capability) but it still calls the wrapper by default anyway.

This patch allows that use, and doesn't give any significant extra access, so I think it is worthy of inclusion in the CVS.

Thanks, merged.

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