Skip to contentSkip to conversation

ssh client domain, miscellaneous changes

PATCH In review Stephen Smalley 4 participants 5 messages Oct 2, 2001 – Oct 3, 2001 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ssh client domain, miscellaneous changes

The attached patch adds a domain for the ssh client program and adds a few other miscellaneous permissions for logrotate and crond. To apply this patch, save it to 'other.patch', change to the selinux directory, and run 'patch -p1 < other.patch'. Then do a 'make load' in the policy directory and a 'make relabel' in the setfiles directory.

--
Stephen D. Smalley, NAI Labs
[email protected]

Index: selinux/policy/rbac

policy/rbac renamed from policy/rbac:1.9 +3 -1
diff -u selinux/policy/rbac:1.9 selinux/policy/rbac:1.11
@@ -94,6 +95,7 @@
 	user_crond_t
 	httpd_user_script_process_t
 	httpd_user_script_t
+	user_ssh_t
 };
 
 #
@@ -126,7 +128,8 @@
 	sysadm_netscape_t
 	sysadm_crontab_t
         sysadm_crond_t
-	ping_t
+	ping_t	
+	sysadm_ssh_t
 };
 
 

Index: selinux/policy/domains/program/logrotate.te

policy/domains/program/logrotate.te renamed from policy/domains/program/logrotate.te:1.4 +6 -1
diff -u selinux/policy/domains/program/logrotate.te:1.4 selinux/policy/domains/program/logrotate.te:1.5
@@ -48,7 +48,12 @@
 
 # Run sendmail in the user mail domain.
 domain_auto_trans(logrotate_t, sendmail_exec_t, user_mail_t)
+allow user_mail_t logrotate_tmp_t:file r_file_perms;
 
-# Write to /var/lib/logrotate.status.
+# Write to /var/lib/logrotate.status - should be moved into its own type.
 allow logrotate_t var_lib_t:dir rw_dir_perms;
 allow logrotate_t var_lib_t:file create_file_perms;
+
+# Write to /var/spool/slrnpull - should be moved into its own type.
+allow logrotate_t var_spool_t:dir { search write add_name remove_name };
+allow logrotate_t var_spool_t:file { rename create setattr unlink };

Index: selinux/policy/domains/program/ssh.te

policy/domains/program/ssh.te new file +50 -0

50 lines not on this page · raw message

Index: selinux/policy/domains/system/crond.te

policy/domains/system/crond.te renamed from policy/domains/system/crond.te:1.14 +3 -2
diff -u selinux/policy/domains/system/crond.te:1.14 selinux/policy/domains/system/crond.te:1.16
@@ -143,6 +143,7 @@
 # Create temporary files.
 type system_crond_tmp_t, file_type, sysadmfile, tmpfile;
 file_type_auto_trans(system_crond_t, tmp_t, system_crond_tmp_t)
+allow user_mail_t system_crond_tmp_t:file ra_file_perms;
 
 # Used for /sbin/tmpwatch
 allow system_crond_t tmpfile:dir rw_dir_perms;
@@ -166,8 +167,8 @@
 allow system_crond_t var_spool_t:dir rw_dir_perms;
 
 # Do not audit attempts to search unlabeled directories (e.g. slocate).
-auditdeny system_crond_t unlabeled_t:dir r_dir_perms;
-auditdeny system_crond_t unlabeled_t:file r_file_perms;
+auditdeny system_crond_t unlabeled_t:dir ~r_dir_perms;
+auditdeny system_crond_t unlabeled_t:file ~r_file_perms;
 
 
 #################################

Index: selinux/policy/domains/system/init.te

policy/domains/system/init.te renamed from policy/domains/system/init.te:1.10 +3 -0
diff -u selinux/policy/domains/system/init.te:1.10 selinux/policy/domains/system/init.te:1.11
@@ -92,3 +92,6 @@
 type_transition init_t automount_exec_t:process automount_t;
 type_transition init_t httpd_exec_t:process httpd_t;
 type_transition init_t pump_exec_t:process pump_t;
+type_transition init_t anacron_exec_t:process system_crond_t;
+type_transition init_t ipsec_exec_t:process ipsec_t;
+type_transition init_t named_exec_t:process named_t;

Index: selinux/policy/domains/user/user.te

policy/domains/user/user.te renamed from policy/domains/user/user.te:1.14 +3 -0
diff -u selinux/policy/domains/user/user.te:1.14 selinux/policy/domains/user/user.te:1.15
@@ -197,6 +197,9 @@
 # Read the mouse.
 allow $1_t mouse_device_t:chr_file r_file_perms;
 
+# Run ssh in a separate domain.
+ssh_domain($1)
+
 ')
 
 

Index: selinux/setfiles/file_contexts

setfiles/file_contexts renamed from setfiles/file_contexts:1.27 +1 -0
diff -u selinux/setfiles/file_contexts:1.27 selinux/setfiles/file_contexts:1.29
@@ -254,6 +256,7 @@
 /usr/bin/makemap		system_u:object_r:sbin_t
 /usr/bin/netscape		system_u:object_r:netscape_exec_t
 /usr/bin/crontab		system_u:object_r:crontab_exec_t
+/usr/bin/ssh			system_u:object_r:ssh_exec_t
 
 
 #
#1 lore raw

Debian distribution of selinux

Is selinux going to be made into a Debian distribution? That would be a good thing.

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#2 lore raw

Re: Debian distribution of selinux

Quoted 2 lines · John S. Gage

Is selinux going to be made into a Debian distribution? That would be a good thing.

There seems to be some interest by some of the Debian developers in creating a SELinux package for the Debian distribution, as evidenced by the recent email by Manoj Srivastava and Russell Coker on the selinux list. See the current mailing list archives (available via email to [email protected] or online at
http://marc.theaimsgroup.com/?l=selinux).

I agree that this would be a good thing, and we are trying to be helpful. However, it will take a certain amount of work, even aside from packaging issues, since the example policy and the modified daemons and utilities were based on a RedHat distribution.

--
Stephen D. Smalley, NAI Labs
[email protected]

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#3 lore raw

Re: Debian distribution of selinux

Quoted 11 lines · Stephen Smalley
Quoted 2 lines · John S. Gage

Is selinux going to be made into a Debian distribution? That would be a good thing.

There seems to be some interest by some of the Debian developers in creating a SELinux package for the Debian distribution, as evidenced by the recent email by Manoj Srivastava and Russell Coker on the selinux list. See the current mailing list archives (available via email to [email protected] or online at
http://marc.theaimsgroup.com/?l=selinux).

Quoted 4 lines

I agree that this would be a good thing, and we are trying to be helpful. However, it will take a certain amount of work, even aside from packaging issues, since the example policy and the modified daemons and utilities were based on a RedHat distribution.

I don't anticipate getting this done in time for the release of woody. :(

I plan to get everything in unstable after woody is released and then create an archive for back-ports to woody.

Signature · 10 lines
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/projects.html Projects I am working on
http://www.coker.com.au/~russell/     My home page


--
You have received this message because you are subscribed to the selinux list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#4 lore raw

Re: Debian distribution of selinux

In reply to John S. Gage
Quoted 1 line
Quoted 1 line

"John" == John S Gage <[email protected]> writes:

John> Is selinux going to be made into a Debian distribution? That would be John> a good thing.

We are trying ;-). At this point, however, there are no
publicly consumable packages available (believe me, you don't want my alpha packages). Russel Coker is probably going to be the lead on this.

manoj

Signature · 10 lines
 The Constitution may not be perfect, but it's a lot better than what
 we've got!
Manoj Srivastava   <[email protected]>    <[email protected]> 
1024R/C7261095 print CB D9 F4 12 68 07 E4 05  CC 2D 27 12 1D F5 E8 6E
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C

--
You have received this message because you are subscribed to the selinux list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.