All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel J Walsh <dwalsh@redhat.com>
To: russell@coker.com.au
Cc: Jim Carter <jwcart2@epoch.ncsc.mil>, SELinux <SELinux@tycho.nsa.gov>
Subject: Re: Latest diffs
Date: Wed, 20 Apr 2005 21:41:47 -0400	[thread overview]
Message-ID: <426704DB.2090600@redhat.com> (raw)
In-Reply-To: <200504202317.46457.russell@coker.com.au>

Russell Coker wrote:

>On Friday 15 April 2005 06:49, Daniel J Walsh <dwalsh@redhat.com> wrote:
>  
>
>>Some cleanups in strict to handle turning off unlimitedRC
>>    
>>
>
>diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/initrc.te 
>policy-1.23.11/domains/program/initrc.te
>--- nsapolicy/domains/program/initrc.te 2005-03-24 08:58:25.000000000 -0500
>+++ policy-1.23.11/domains/program/initrc.te    2005-04-14 15:30:19.000000000 
>-0400
>@@ -12,7 +12,7 @@
> # initrc_exec_t is the type of the init program.
> #
> # do not use privmail for sendmail as it creates a type transition conflict
>-type initrc_t, ifdef(`unlimitedRC', `admin, etc_writer, fs_domain, privmem, 
>auth_write, ') domain, privlog, privowner, privmodule, ifdef(`sendmail.te', 
>`', `privmail,') ifdef(`distro_debian', `etc_writer, ') sysctl_kernel_writer, 
>nscd_client_domain;
>+type initrc_t, fs_domain, ifdef(`unlimitedRC', `admin, etc_writer, privmem, 
>auth_write, ') domain, privlog, privowner, privmodule, ifdef(`sendmail.te', 
>`', `privmail,') ifdef(`distro_debian', `etc_writer, ') sysctl_kernel_writer, 
>nscd_client_domain;
> 
> role system_r types initrc_t;
> uses_shlib(initrc_t);
>
>Note that the above is needed for the following command:
>echo "raidautorun /dev/md0" | nash --quiet
>
>Below are the relevant bits from the strace output:
>mknod("/dev/md0", S_IFBLK|0600, makedev(9, 0)) = 0
>open("/dev/md0", O_RDWR)                = 0
>ioctl(0, 0x914, 0)                      = 0
>
>What does ioctl 0x914 do?  Is there a better way we can manage the device node 
>creation?  Can udev create it?
>
>  
>
We should create a bugzilla for it.

>@@ -195,10 +195,8 @@
> allow initrc_t tmpfs_t:chr_file rw_file_perms;
> allow initrc_t tmpfs_t:dir r_dir_perms;
> 
>-ifdef(`distro_redhat', ` 
> # Allow initrc domain to set the enforcing flag.
> can_setenforce(initrc_t)
>-')
> 
> #
> # readahead asks for these
>
>I don't think that we can count on all distributions needing init scripts that 
>toggle between permissive and enforcing modes, so this conditional should 
>remain in.
>
>  
>
This was already within a block of ifdef(distro_redhat)

>@@ -209,6 +207,7 @@
> # for /halt /.autofsck and other flag files
> file_type_auto_trans({ initrc_t sysadm_t }, root_t, etc_runtime_t, file)
> 
>+file_type_auto_trans(initrc_t, device_t, fixed_disk_device_t, blk_file)
> ')dnl end distro_redhat
> 
> allow initrc_t system_map_t:{ file lnk_file } r_file_perms;
>
>Probably should have a comment for this, something like the following:
># This is so that nash can create /dev/md0 for RAID device auto-detection.
>
>Also should have ifdef(`distro_redhat' around it as only Red Hat has nash.
>
>  
>
It is notice the next line.

>diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/load_policy.te 
>policy-1.23.11/domains/program/load_policy.te
>--- nsapolicy/domains/program/load_policy.te    2005-04-14 15:01:53.000000000 
>-0400
>+++ policy-1.23.11/domains/program/load_policy.te       2005-04-14 
>15:20:16.000000000 -0400
>@@ -58,3 +58,4 @@
> 
> read_locale(load_policy_t)
> r_dir_file(load_policy_t, selinux_config_t)
>+allow load_policy_t proc_t:file { getattr read };
>
>I think it's best to add this to the can_loadpol() macro to make things 
>clearer.
>
>  
>
I don't think it is necessary now that the is_selinux_enabled call has 
been removed.

>>Added audit_control to login domains to handle pam_loginuid.so
>>
>>Fixes for syslogng
>>    
>>
>
>diff --exclude-from=exclude -N -u -r nsapolicy/domains/program/syslogd.te 
>policy-1.23.11/domains/program/syslogd.te
>--- nsapolicy/domains/program/syslogd.te        2005-04-04 10:21:10.000000000 
>-0400
>+++ policy-1.23.11/domains/program/syslogd.te   2005-04-14 15:20:16.000000000 
>-0400
>@@ -111,4 +111,6 @@
> allow syslogd_t kernel_t:system { syslog_mod syslog_console };
> allow syslogd_t self:capability { sys_admin chown fsetid };
> allow syslogd_t var_log_t:dir { create setattr };
>+allow syslogd_t syslogd_port_t:tcp_socket name_bind;
>+allow syslogd_t rsh_port_t:tcp_socket name_connect;
> }
>
>What is this about?  We don't have a syslogd_port_t label on a TCP port, and 
>AFAIK syslogd doesn't use TCP anyway.
>
>  
>
syslogng uses tcp and it uses the rsh_port_t.  The syslogd_port_t line 
should be removed.

>Why would a syslogd want to connect to a rsh server?
>
>
>  
>
shell           514/tcp         cmd             # no passwords used
syslog        514/udp

syslog-ng defaults to port 514 for tcp connections.


>diff --exclude-from=exclude -N -u -r 
>nsapolicy/domains/program/unused/apache.te 
>policy-1.23.11/domains/program/unused/apache.te
>--- nsapolicy/domains/program/unused/apache.te  2005-04-07 22:22:55.000000000 
>-0400
>+++ policy-1.23.11/domains/program/unused/apache.te     2005-04-14 
>15:20:16.000000000 -0400
>@@ -401,3 +401,4 @@
> dontaudit system_mail_t httpd_t:tcp_socket { read write };
> ')
> 
>+allow httpd_t var_t:file read;
>
>I don't think that httpd_t needs to access var_t:file.  If it did then it 
>would certainly need more than just read access.
>
>
>+# Don't use logdir_domain since this is a security file
>+type auditd_log_t, file_type, secure_file_type;
>+file_type_auto_trans(auditd_t, var_log_t, auditd_log_t, file)
>+allow auditd_t auditd_log_t:dir { setattr rw_dir_perms };
>
>We should have the following instead:
>
># Do not use logdir_domain since this is a security file
>type auditd_log_t, file_type, secure_file_type;
>allow auditd_t var_log_t:dir search;
>rw_dir_create_file(auditd_t, auditd_log_t)
>
>Apostrophies are bad.  We want to limit where auditd_t can write to as much as 
>possible.
>
>  
>


-- 



--
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:[~2005-04-21  1:41 UTC|newest]

Thread overview: 143+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-14 20:49 Latest diffs Daniel J Walsh
2005-04-20 13:17 ` Russell Coker
2005-04-21  1:41   ` Daniel J Walsh [this message]
2005-04-21 12:32   ` Daniel J Walsh
  -- strict thread matches above, loose matches on Subject: below --
2007-01-03 16:54 Daniel J Walsh
2007-01-03 21:37 ` Klaus Weidner
2007-01-03 21:48 ` Klaus Weidner
2007-01-08 17:48   ` Christopher J. PeBenito
2007-01-09  4:47     ` Klaus Weidner
2007-01-03 22:05 ` Russell Coker
2007-01-04 13:33   ` Steve G
2007-01-04 15:47     ` Klaus Weidner
2007-01-04 16:23     ` Russell Coker
2007-01-04 16:47   ` Casey Schaufler
2007-01-04 17:07     ` Russell Coker
2007-01-04 17:24       ` Casey Schaufler
2007-01-04 18:27       ` Erich Schubert
2006-10-24 15:00 Latest Diffs Daniel J Walsh
2006-10-31 21:00 ` Christopher J. PeBenito
2006-11-14 20:11   ` Daniel J Walsh
2006-11-15  9:49     ` Russell Coker
2006-11-15 13:39       ` Daniel J Walsh
2006-11-15 17:33         ` Russell Coker
2006-11-16 13:49           ` Christopher J. PeBenito
2006-11-17 13:07             ` Russell Coker
2006-11-17 18:33               ` Joshua Brindle
2006-11-17 21:27                 ` Russell Coker
2006-09-29 19:05 latest diffs Daniel J Walsh
2006-09-20 16:12 Latest diffs Daniel J Walsh
2006-09-21 13:45 ` Christopher J. PeBenito
2006-09-21 14:06   ` Daniel J Walsh
2006-09-21 14:34     ` Christopher J. PeBenito
2006-09-21 16:33       ` Karl MacMillan
2006-09-21 18:05         ` Christopher J. PeBenito
2006-09-21 14:08   ` Mikel L. Matthews
2006-09-21 14:49     ` Joshua Brindle
2006-09-21 15:10       ` Mikel L. Matthews
2006-09-21 15:18       ` Stephen Smalley
2006-09-21 15:40       ` Joe Nall
2006-09-21 15:47       ` Klaus Weidner
2006-09-21 16:08       ` Casey Schaufler
2006-09-22 17:13 ` Christopher J. PeBenito
2006-09-22 20:30   ` Daniel J Walsh
2006-09-25 18:51     ` Christopher J. PeBenito
2006-09-25 19:10       ` Daniel J Walsh
2006-09-26 10:41       ` Russell Coker
2006-09-26 13:13         ` Christopher J. PeBenito
2006-09-26 13:21           ` Russell Coker
2006-09-26 14:01             ` Christopher J. PeBenito
2006-09-23  2:22   ` Russell Coker
2006-09-05 21:06 Latest Diffs Daniel J Walsh
2006-09-06 16:33 ` Christopher J. PeBenito
2006-08-02 17:33 Latest diffs Daniel J Walsh
2006-06-20 20:19 Daniel J Walsh
2006-06-21 18:31 ` Christopher J. PeBenito
2006-06-12 19:32 Daniel J Walsh
2006-06-12 21:39 ` Christopher J. PeBenito
2006-06-12 21:47   ` Christopher J. PeBenito
     [not found] <44863F06.90206@comcast.net>
2006-06-07 17:46 ` Christopher J. PeBenito
2006-05-18 15:56 Daniel J Walsh
2006-05-19 14:04 ` Christopher J. PeBenito
2006-05-19 14:13   ` Daniel J Walsh
2006-05-19 17:40     ` Christopher J. PeBenito
2006-05-19 18:25       ` Daniel J Walsh
     [not found] <445767D1.3040406@redhat.com>
2006-05-02 15:19 ` Christopher J. PeBenito
     [not found]   ` <44579740.4010708@redhat.com>
2006-05-02 17:57     ` Christopher J. PeBenito
2006-04-20 18:57 Chad Hanson
2006-04-20 18:06 Daniel J Walsh
2006-04-20 18:17 ` Christopher J. PeBenito
2006-04-19  3:16 Daniel J Walsh
2006-04-19 15:34 ` Christopher J. PeBenito
2006-02-20 22:19 Daniel J Walsh
2006-02-23 14:18 ` Christopher J. PeBenito
2006-02-09 18:39 Daniel J Walsh
2006-02-13 22:08 ` Christopher J. PeBenito
2006-02-14 14:01   ` Daniel J Walsh
2006-02-14 19:03     ` Joshua Brindle
2006-02-16 19:30     ` Christopher J. PeBenito
2006-02-01 13:33 Latest Diffs Daniel J Walsh
2006-02-06 22:50 ` Christopher J. PeBenito
2006-01-19 19:16 Daniel J Walsh
2006-01-19 23:18 ` Christopher J. PeBenito
2006-01-20 13:56   ` Daniel J Walsh
2006-01-20 14:53     ` Christopher J. PeBenito
2006-01-17 22:50 Latest diffs Daniel J Walsh
2006-01-18 14:26 ` Christopher J. PeBenito
2006-01-10 14:15 Daniel J Walsh
2006-01-11 15:55 ` Christopher J. PeBenito
2005-12-13 22:07 Latest Diffs Daniel J Walsh
2005-12-14 15:35 ` Christopher J. PeBenito
2005-12-13 15:48 Latest diffs Daniel J Walsh
2005-12-13 20:43 ` Christopher J. PeBenito
2005-12-13 21:56   ` Daniel J Walsh
2005-09-16 17:43 Latest Diffs Daniel J Walsh
2005-10-20 20:23 ` James Carter
2005-08-15 14:29 Daniel J Walsh
2005-07-19 21:12 Latest diffs Daniel J Walsh
2005-07-19 22:16 ` Ivan Gyurdiev
2005-07-20 15:02   ` Daniel J Walsh
2005-07-20 18:41     ` Ivan Gyurdiev
2005-07-20 19:37       ` Daniel J Walsh
2005-07-20 20:56         ` Ivan Gyurdiev
2005-07-20  0:05 ` Casey Schaufler
2005-07-20  2:03   ` Frank Mayer
2005-07-20  2:29     ` Casey Schaufler
2005-07-20  2:49       ` Daniel J Walsh
2005-07-20  3:33         ` Casey Schaufler
2005-07-12 20:24 Latest Diffs Daniel J Walsh
2005-07-08  1:11 Latest diffs Daniel J Walsh
2005-05-28  5:15 latest diffs Daniel J Walsh
2005-04-27 21:17 Latest diffs Daniel J Walsh
2005-02-10 23:24 Daniel J Walsh
     [not found] <1106940328.32737.120.camel@moss-spartans.epoch.ncsc.mil>
2005-01-28 19:48 ` Daniel J Walsh
2005-02-01 18:45   ` James Carter
2005-02-01 19:48     ` Stephen Smalley
2005-02-01 21:41       ` Ivan Gyurdiev
2005-02-02 12:57         ` Stephen Smalley
2005-02-02 13:08       ` Stephen Smalley
2005-02-02 13:17         ` Stephen Smalley
2005-02-02 13:32           ` Daniel J Walsh
2005-02-04  0:58             ` Ivan Gyurdiev
2005-02-04 12:23               ` Stephen Smalley
2005-02-04 12:42                 ` Ivan Gyurdiev
2005-02-04 12:50                   ` Stephen Smalley
2005-02-04 13:59               ` Daniel J Walsh
2005-02-04 14:10                 ` Stephen Smalley
2005-02-04 15:28                   ` Ivan Gyurdiev
2005-02-07  7:53                     ` Ivan Gyurdiev
2005-02-07 19:33                   ` Richard Hally
2005-02-07 19:34                     ` Stephen Smalley
2005-02-10 15:16             ` James Carter
2004-10-25 21:40 latest diffs Daniel J Walsh
2004-10-27 14:35 ` James Carter
2004-10-20 15:24 Latest diffs Daniel J Walsh
2004-10-20 19:18 ` Colin Walters
2004-10-23  4:24   ` Russell Coker
2004-08-25 15:21 Latest Diffs Daniel J Walsh
2004-08-27 13:52 ` James Carter
2004-08-28 12:55   ` Russell Coker
2004-08-30 20:23     ` James Carter
2004-08-28 12:46 ` Russell Coker
2004-08-30 13:54   ` Daniel J Walsh
2004-08-30 15:50     ` Stephen Smalley

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=426704DB.2090600@redhat.com \
    --to=dwalsh@redhat.com \
    --cc=SELinux@tycho.nsa.gov \
    --cc=jwcart2@epoch.ncsc.mil \
    --cc=russell@coker.com.au \
    /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.