All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell Coker <russell@coker.com.au>
To: SE Linux <selinux@tycho.nsa.gov>
Subject: policy patch
Date: Sun, 11 Jul 2004 17:59:34 +1000	[thread overview]
Message-ID: <200407111759.34090.russell@coker.com.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 857 bytes --]

file_type_auto_trans(sysadm_t, user_home_dir_t, user_home_t)

I remove the above from domains/admin.te because it's granted to privhome by 
macros/user_macros.te and sysadm_t has the privhome attribute.

checkpolicy_t should not be creating lnk_file, sock_file, or fifo_file objects 
of type policy_config_t, and if there are sock_file or fifo_file objects of 
type policy_src_t then it should not be reading them.

system_crond_t should not be trying to access device nodes of types that are 
for files.

I still don't think that dmesg_t is appropriate for running dmesg from the 
administrator shell.

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

[-- Attachment #2: diff --]
[-- Type: text/x-diff, Size: 2754 bytes --]

diff -ru /usr/src/se/policy/domains/admin.te ./domains/admin.te
--- /usr/src/se/policy/domains/admin.te	2004-05-30 16:26:57.000000000 +1000
+++ ./domains/admin.te	2004-07-08 19:20:25.000000000 +1000
@@ -31,4 +31,3 @@
 
 # Add/remove user home directories
 file_type_auto_trans(sysadm_t, home_root_t, user_home_dir_t, dir)
-file_type_auto_trans(sysadm_t, user_home_dir_t, user_home_t)
diff -ru /usr/src/se/policy/domains/program/checkpolicy.te ./domains/program/checkpolicy.te
--- /usr/src/se/policy/domains/program/checkpolicy.te	2004-06-03 14:11:05.000000000 +1000
+++ ./domains/program/checkpolicy.te	2004-07-09 11:17:36.000000000 +1000
@@ -23,7 +23,7 @@
 
 # able to create and modify binary policy files
 allow checkpolicy_t policy_config_t:dir rw_dir_perms;
-allow checkpolicy_t policy_config_t:notdevfile_class_set create_file_perms;
+allow checkpolicy_t policy_config_t:file create_file_perms;
 
 ###########################
 # constrain what checkpolicy can use as source files
@@ -31,7 +31,7 @@
 
 # only allow read of policy source files
 allow checkpolicy_t policy_src_t:dir r_dir_perms;
-allow checkpolicy_t policy_src_t:notdevfile_class_set r_file_perms;
+allow checkpolicy_t policy_src_t:{ file lnk_file } r_file_perms;
 
 # allow test policies to be created in src directories
 file_type_auto_trans(checkpolicy_t, policy_src_t, policy_config_t, file)
diff -ru /usr/src/se/policy/domains/program/crond.te ./domains/program/crond.te
--- /usr/src/se/policy/domains/program/crond.te	2004-07-11 17:37:09.000000000 +1000
+++ ./domains/program/crond.te	2004-07-09 07:17:19.000000000 +1000
@@ -61,7 +61,7 @@
 allow crond_t cron_spool_t:file r_file_perms;
 
 # Read /etc/security/default_contexts.
-r_dir_file( crond_t, default_context_t)
+r_dir_file(crond_t, default_context_t)
 
 allow crond_t etc_t:file { getattr read };
 allow crond_t etc_t:lnk_file read;
@@ -147,7 +147,8 @@
 ')
 
 # Stat any file and search any directory for find.
-allow system_crond_t file_type:file_class_set getattr;
+allow system_crond_t file_type:notdevfile_class_set getattr;
+allow system_crond_t device_type:{ chr_file blk_file } getattr;
 allow system_crond_t file_type:dir { read search getattr };
 
 # Create temporary files.
diff -ru /usr/src/se/policy/domains/program/dmesg.te ./domains/program/dmesg.te
--- /usr/src/se/policy/domains/program/dmesg.te	2004-06-17 15:10:38.000000000 +1000
+++ ./domains/program/dmesg.te	2004-07-04 18:17:42.000000000 +1000
@@ -9,7 +9,10 @@
 #
 # dmesg_exec_t is the type of the dmesg executable.
 #
-daemon_base_domain(dmesg)
+# while sysadm_t has the sys_admin capability there is no point in using
+# dmesg_t when run from sysadm_t, so we use nosysadm.
+#
+daemon_base_domain(dmesg, , `nosysadm')
 
 #
 # Rules used for dmesg

             reply	other threads:[~2004-07-11  7:59 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-11  7:59 Russell Coker [this message]
2004-07-12 13:30 ` policy patch Stephen Smalley
  -- strict thread matches above, loose matches on Subject: below --
2005-08-18  7:31 Russell Coker
2005-01-12 18:46 [Fwd: New policy patch] Daniel J Walsh
2005-01-21 20:36 ` James Carter
2005-03-29 16:47   ` Policy Patch Daniel J Walsh
2005-04-01 20:28     ` James Carter
2004-11-25 13:27 policy patch Russell Coker
2004-11-25 16:32 ` Luke Kenneth Casson Leighton
2004-11-25 19:05   ` Russell Coker
2004-11-25 20:34     ` Luke Kenneth Casson Leighton
2004-11-29 19:23 ` James Carter
2004-11-29 21:47 ` Daniel J Walsh
2004-11-30 16:42 ` Daniel J Walsh
2004-10-13  5:55 Russell Coker
2004-10-13 20:17 ` James Carter
2004-08-24  8:18 Russell Coker
2004-08-24 12:23 ` Stephen Smalley
2004-08-24 16:54   ` Russell Coker
2004-08-27 20:58 ` James Carter
2004-08-28 13:46   ` Russell Coker
2004-08-30 20:24     ` James Carter
2004-07-12 14:12 Russell Coker
2004-07-12 19:46 ` Luke Kenneth Casson Leighton
2004-07-04  5:04 Russell Coker
2004-07-07 20:47 ` Stephen Smalley
2002-12-03 14:47 Stephen D. Smalley
2002-11-29 11:45 Russell Coker
2002-09-21  4:39 Russell Coker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200407111759.34090.russell@coker.com.au \
    --to=russell@coker.com.au \
    --cc=selinux@tycho.nsa.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.