All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel J Walsh <dwalsh@redhat.com>
To: russell@coker.com.au
Cc: jwcart2@epoch.ncsc.mil, SELinux <selinux@tycho.nsa.gov>
Subject: Re: More SELinux fixes.
Date: Tue, 12 Oct 2004 14:55:10 -0400	[thread overview]
Message-ID: <416C288E.1010001@redhat.com> (raw)
In-Reply-To: <200410101736.25763.russell@coker.com.au>

Russell Coker wrote:

>On Sun, 10 Oct 2004 11:26, Daniel J Walsh <dwalsh@redhat.com> wrote:
>  
>
>>Temporarily added a rule to allow apache to talk to tmp_t:sock_file in
>>targeted policy.  This allows
>>it to work with postgresql.  Not sure of a good way to fix this.  One we
>>    
>>
>
>I don't think that there is any other option.  As long as apache has to talk 
>to programs in unconfined_t via unix domain sockets such access is required.
>
>  
>
Ok.  It is in there.

>>could add postgresql policy to targeted
>>but I am afraid this is a slipperly slope,  Colin suggested that we add
>>a new policy postgresql_unconfined.te for
>>targeted that basically runs postgres unconfined but creates /tmp files
>>with an appropriate security context.
>>    
>>
>
>Might as well go the whole hog and make Postgresql use it's regular policy.  
>Postgresql isn't THAT difficult to do.
>
>dontaudit mount_t reserved_port_type:{tcp_socket udp_socket} name_bind;
>
>Why remove all the rules of that form?  Has something equivalent been added to 
>a macro?
>
>  
>
This is now defined in can_ypbind, but I guess for mount_t it should 
remain.  Some of these
rules were proliferating because of yp.  If the app uses portmap, it 
will need this rule otherwise it
can rely in the rule in can_ypbind.

>+can_exec(postgresql_t, { postgresql_exec_t bin_t sbin_t ls_exec_t su_exec_t 
>shell_exec_t etc_t hostname_exec_t })
>
>The above really needs to become:
>ifdef(`hostname.te', `
>can_exec(postgresql_t, hostname_exec_t)
>')
>  
>
Done

>+allow procmail_t mqueue_spool_t:file { getattr read };
>
>I believe that this is a bug in sendmail.  Put in the following instead:
>ifdef(`hide_broken_symptoms', `
>dontaudit procmail_t mqueue_spool_t:file { getattr read };
>')
>  
>
Ok I changed it.

>Also put it inside ifdef(`sendmail.te', only sendmail.te uses mqueue_spool_t, 
>so we should move the type declaration into sendmail.te.
>
>-file_type_auto_trans(snmpd_t, { usr_t var_t }, snmpd_var_lib_t, file)
>+file_type_auto_trans(snmpd_t, usr_t, snmpd_var_lib_t, file)
>+file_type_auto_trans(snmpd_t, var_t, snmpd_var_lib_t, file)
>
>What is the point of this change?
>  
>
I thought combining these caused problems.  I saw some avc messages with 
snmpd trying to write to var_t, which
I thought might have been caused by a macro expansion problem.  When I 
changed to the above, the problem
went away, could have been a red herring.

>+allow udev_t dev_fs:{ chr_file blk_file } { relabelfrom relabelto };
>
>The above is redundant, the below line covers it.
>
>allow udev_t { device_t device_type }:{ chr_file blk_file } { relabelfrom 
>relabelto create_file_perms };
>
>  
>
I think the problem came in because these files are not covered by the 
above command
type sysadm_tty_device_t, file_type, sysadmfile, ttyfile, dev_fs;
type user_tty_device_t, file_type, sysadmfile, ttyfile, user_tty_type, 
dev_fs;
type staff_tty_device_t, file_type, sysadmfile, ttyfile, user_tty_type, 
dev_fs;

If you stop and restart udev, you get lots of AVC's from these.

--
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-10-12 18:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-07 21:48 More SELinux fixes Daniel J Walsh
2004-10-08 13:41 ` Russell Coker
2004-10-08 19:11   ` James Carter
2004-10-08 18:06 ` James Carter
2004-10-08 20:04   ` Daniel J Walsh
2004-10-09  6:22   ` Russell Coker
2004-10-10  1:26     ` Daniel J Walsh
2004-10-10  7:36       ` Russell Coker
2004-10-12 18:55         ` Daniel J Walsh [this message]
2004-10-13 10:43           ` Russell Coker
2004-10-13 20:28             ` James Carter
2004-10-13 18:36       ` James Carter
2004-10-09  3:10 ` 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=416C288E.1010001@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.