All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel J Walsh <dwalsh@redhat.com>
To: jwcart2@epoch.ncsc.mil
Cc: Russell Coker <russell@coker.com.au>, SE Linux <selinux@tycho.nsa.gov>
Subject: Re: Policy patches
Date: Mon, 20 Sep 2004 08:35:42 -0400	[thread overview]
Message-ID: <414ECE9E.8030001@redhat.com> (raw)
In-Reply-To: <1095454617.4295.55.camel@moss-lions.epoch.ncsc.mil>

James Carter wrote:

>On Thu, 2004-09-16 at 17:23, Daniel J Walsh wrote:
>  
>
>>New patches to allow hald to add a lines to the /etc/fstab with 
>>fscontext=system_u:object_r:removable_t.
>>
>>Dan
>>    
>>
>
>  
>
>>diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/nscd.te policy-1.17.17/domains/program/unused/nscd.te
>>--- nsapolicy/domains/program/unused/nscd.te	2004-09-16 09:48:15.000000000 -0400
>>+++ policy-1.17.17/domains/program/unused/nscd.te	2004-09-16 15:02:07.387150095 -0400
>>@@ -70,4 +70,8 @@
>> #
>> dontaudit nscd_t var_run_t:sock_file rw_file_perms;
>> 
>>+allow nscd_t self:file { getattr read };
>>+allow nscd_t proc_t:file { getattr read };
>>+allow nscd_t selinux_config_t:dir { search };
>>+r_dir_file(nscd_t, default_context_t)
>> 
>>    
>>
>
>Is this only for the targeted policy?  Maybe userspace_objectmgr.te
>  
>
I will look into it.  The problem is everytime we add one it seems to 
have expanding
concequences.

>should be part of the targeted policy.  I think we would gain most of
>these permissions in that case.
>
>When does nscd access a default_context_t?
>
>  
>
That probably was overzealous. Remove it.

>>diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/portmap.te policy-1.17.17/domains/program/unused/portmap.te
>>--- nsapolicy/domains/program/unused/portmap.te	2004-09-16 09:48:15.000000000 -0400
>>+++ policy-1.17.17/domains/program/unused/portmap.te	2004-09-16 11:55:04.363237680 -0400
>>@@ -54,3 +54,4 @@
>> 
>> # do not log when it tries to bind to a port belonging to another domain
>> #dontaudit portmap_t port_type:{ tcp_socket udp_socket } name_bind;
>>+dontaudit portmap_t tty_device_t:chr_file { read write };
>>    
>>
>
>How about this, so it applies to more then just portmap?
>
>diff -u -r1.58 global_macros.te
>--- global_macros.te	15 Sep 2004 19:58:14 -0000	1.58
>+++ global_macros.te	17 Sep 2004 20:43:47 -0000
>@@ -294,6 +294,7 @@
> allow $1_t autofs_t:dir { search getattr };
> ')dnl end if automount.te
> ifdef(`targeted_policy', `
>+dontaudit $1_t tty_device_t:chr_file { read write };
> dontaudit $1_t devpts_t:chr_file { read write };
> dontaudit $1_t root_t:file { getattr read };
> ')dnl end if targeted_policy
>
>  
>
Looks good.

>>diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/unused/updfstab.te policy-1.17.17/domains/program/unused/updfstab.te
>>--- nsapolicy/domains/program/unused/updfstab.te	2004-09-10 10:17:49.000000000 -0400
>>+++ policy-1.17.17/domains/program/unused/updfstab.te	2004-09-16 13:36:58.170098295 -0400
>>@@ -62,3 +62,10 @@
>> 
>> r_dir_file(updfstab_t, { selinux_config_t file_context_t default_context_t } )
>> can_getsecurity(updfstab_t)
>>+
>>+allow updfstab_t { sbin_t bin_t }:dir { search getattr };
>>+dontaudit updfstab_t devtty_t:chr_file { read write };
>>+allow updfstab_t self:fifo_file { getattr read write ioctl };
>>+can_exec(updfstab_t, { sbin_t bin_t ls_exec_t } )
>>+dontaudit updfstab_t home_root_t:dir { getattr search };
>>+dontaudit updfstab_t { home_dir_type home_type }:dir { search };
>>    
>>
>
>Why can_exec(ls_exec_t)?
>
>  
>
One of the scripts it execs execs ls.  Why does ls have it's own domain?

>>diff --exclude-from=exclude -N -u -r nsapolicy/macros/user_macros.te policy-1.17.17/macros/user_macros.te
>>--- nsapolicy/macros/user_macros.te	2004-09-14 09:18:11.000000000 -0400
>>+++ policy-1.17.17/macros/user_macros.te	2004-09-16 13:38:06.207431159 -0400
>>@@ -230,6 +230,12 @@
>> mount_domain($1, $1_mount, `, fs_domain')
>> role $1_r types $1_mount_t;
>> r_dir_file($1_t, mnt_t)
>>+allow $1_mount_t removable_device_t:blk_file { read };
>>+allow $1_mount_t iso9660_t:filesystem { relabelfrom };
>>+allow $1_mount_t removable_t:filesystem { mount relabelto };
>>+allow $1_mount_t removable_t:dir { mounton };
>>+allow $1_mount_t xdm_t:fd { use };
>>+allow $1_mount_t xdm_t:fifo_file { write };
>> ')
>>    
>>
>
>Shouldn't these rules need to be in other macros as well?
>Also, the xdm_t rules should be in a ifdef.
>
>  
>
Probably, just began experimenting with the new updatefstab patch that 
adds this, so we
should be seeing lots of complaints.

Dan


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

  reply	other threads:[~2004-09-20 12:35 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-16 11:51 hald fix Russell Coker
2004-09-16 13:44 ` Stephen Smalley
2004-09-16 16:52   ` Daniel J Walsh
2004-09-16 17:09     ` Stephen Smalley
2004-09-16 14:52 ` James Carter
2004-09-16 17:40   ` James Carter
2004-09-17 15:31     ` Important fix for targeted policy Daniel J Walsh
2004-09-20 19:48       ` James Carter
2004-09-16 21:23   ` Policy patches Daniel J Walsh
2004-09-17 12:07     ` Russell Coker
2004-09-20 20:03       ` James Carter
2004-09-17 20:56     ` James Carter
2004-09-20 12:35       ` Daniel J Walsh [this message]
2004-09-21 20:55         ` Daniel J Walsh
2004-09-22 20:21           ` James Carter
  -- strict thread matches above, loose matches on Subject: below --
2005-09-19  5:13 policy patches Russell Coker
2005-01-02 12:03 Russell Coker
2005-01-04 19:33 ` James Carter
2005-01-05 16:45 ` James Carter
2004-09-29 13:54 Russell Coker
2004-09-29 17:45 ` Thomas Bleher
2004-09-29 20:20   ` Russell Coker
2004-10-01 16:42     ` James Carter
2004-10-01 17:44       ` Russell Coker
2004-10-01 20:45         ` Daniel J Walsh
2004-10-02  0:42           ` Russell Coker
2004-10-02 10:16             ` Daniel J Walsh
2004-10-02 20:14               ` Russell Coker
2004-10-06 15:28                 ` Daniel J Walsh
2004-10-10 17:37                   ` Russell Coker
2004-10-02  0:43           ` Russell Coker
2004-10-02 10:18             ` Daniel J Walsh
2004-10-02 20:15               ` Russell Coker
2004-10-04 20:12         ` James Carter
2004-10-05 15:41           ` Daniel J Walsh
2004-10-05 17:35             ` James Carter
     [not found]               ` <4162DEC3.4050306@redhat.com>
2004-10-05 18:22                 ` James Carter
2004-10-05 19:06             ` James Carter
2004-10-06 10:10               ` Luke Kenneth Casson Leighton
2004-10-06 11:40                 ` Erich Schubert
2004-10-06 12:32                 ` James Carter
2004-10-06 13:13                 ` Daniel J Walsh
2004-10-06 13:50                   ` Luke Kenneth Casson Leighton
2004-08-19 12:57 Russell Coker
2004-08-20 19:07 ` Stephen Smalley
2003-04-26  7:30 Russell Coker
2003-03-27 18:25 Kelly_Djahandari
2003-03-26 17:47 Kelly_Djahandari
2003-03-22 22:53 Russell Coker
2003-03-22 22:14 Russell Coker
2003-03-24 17:13 ` Wayne Salamon
2002-11-04 12:41 Russell Coker
2002-09-09 22:59 Russell Coker
2002-09-21  2:39 ` Stephen Smalley
2002-08-09 15:30 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=414ECE9E.8030001@redhat.com \
    --to=dwalsh@redhat.com \
    --cc=jwcart2@epoch.ncsc.mil \
    --cc=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.