All of lore.kernel.org
 help / color / mirror / Atom feed
From: david@hardeman.nu
To: selinux@tycho.nsa.gov
Subject: [patch 05/35] courier policy update
Date: Mon, 04 Aug 2008 14:35:01 +0200	[thread overview]
Message-ID: <20080804123735.341195390@hardeman.nu> (raw)
In-Reply-To: 20080804123456.679565839@hardeman.nu

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 4143 bytes --]

Adds a separate context for courier spooling dirs/files and a few
new interfaces.

Originally sent on Jul 19, received no comments, refreshed patch only

Index: refpolicy/policy/modules/services/courier.fc
===================================================================
--- refpolicy.orig/policy/modules/services/courier.fc	2008-08-03 13:09:39.000000000 +0200
+++ refpolicy/policy/modules/services/courier.fc	2008-08-03 17:04:59.000000000 +0200
@@ -19,3 +19,5 @@
 /var/lib/courier(/.*)?			--	gen_context(system_u:object_r:courier_var_lib_t,s0)
 
 /var/run/courier(/.*)?			--	gen_context(system_u:object_r:courier_var_run_t,s0)
+
+/var/spool/courier(/.*)?		gen_context(system_u:object_r:courier_spool_t,s0)
Index: refpolicy/policy/modules/services/courier.if
===================================================================
--- refpolicy.orig/policy/modules/services/courier.if	2008-08-03 16:47:00.000000000 +0200
+++ refpolicy/policy/modules/services/courier.if	2008-08-03 17:05:41.000000000 +0200
@@ -123,3 +123,77 @@
 
 	domtrans_pattern($1, courier_pop_exec_t, courier_pop_t)
 ')
+
+
+########################################
+## <summary>
+##	Allow domain to read courier config files
+## </summary>
+## <param name="prefix">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+#
+interface(`courier_read_config',`
+	gen_require(`
+		type courier_etc_t;
+	')
+
+	read_files_pattern($1, courier_etc_t, courier_etc_t)
+')
+
+########################################
+## <summary>
+##	Allow domain to manage courier spool directories
+## </summary>
+## <param name="prefix">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+#
+interface(`courier_manage_spool_dirs',`
+	gen_require(`
+		type courier_spool_t;
+	')
+
+	manage_dirs_pattern($1, courier_spool_t, courier_spool_t)
+')
+
+########################################
+## <summary>
+##	Allow domain to manage courier spool files
+## </summary>
+## <param name="prefix">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+#
+interface(`courier_manage_spool_files',`
+	gen_require(`
+		type courier_spool_t;
+	')
+
+	manage_files_pattern($1, courier_spool_t, courier_spool_t)
+')
+
+########################################
+## <summary>
+##	Allow attempts to read and write to
+##	courier unnamed pipes.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain to not audit.
+##	</summary>
+## </param>
+#
+interface(`courier_rw_pipes',`
+	gen_require(`
+		type courier_spool_t;
+	')
+
+	allow $1 courier_spool_t:fifo_file rw_fifo_file_perms;
+')
Index: refpolicy/policy/modules/services/courier.te
===================================================================
--- refpolicy.orig/policy/modules/services/courier.te	2008-08-03 16:47:00.000000000 +0200
+++ refpolicy/policy/modules/services/courier.te	2008-08-03 17:04:59.000000000 +0200
@@ -9,7 +9,10 @@
 courier_domain_template(authdaemon)
 
 type courier_etc_t;
-files_type(courier_etc_t)
+files_config_file(courier_etc_t)
+
+type courier_spool_t;
+files_type(courier_spool_t)
 
 courier_domain_template(pcp)
 
@@ -25,6 +28,7 @@
 
 type courier_exec_t;
 files_type(courier_exec_t)
+mta_mailclient(courier_exec_t)
 
 courier_domain_template(sqwebmail)
 typealias courier_sqwebmail_exec_t alias sqwebmail_cron_exec_t;
@@ -97,12 +101,12 @@
 courier_domtrans_authdaemon(courier_pop_t)
 
 # do the actual work (read the Maildir)
-userdom_manage_unpriv_users_home_content_files(courier_pop_t)
+unprivuser_manage_home_content_files(courier_pop_t)
 # cjp: the fact that this is different for pop vs imap means that
 # there should probably be a courier_pop_t and courier_imap_t
 # this should also probably be a separate type too instead of
 # the regular home dir
-userdom_manage_unpriv_users_home_content_dirs(courier_pop_t)
+unprivuser_manage_home_content_dirs(courier_pop_t)
 
 ########################################
 #

-- 
David Härdeman

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

  parent reply	other threads:[~2008-08-04 12:38 UTC|newest]

Thread overview: 89+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-04 12:34 [patch 00/35] Second round of Fedora/RedHat SELinux changes david
2008-08-04 12:34 ` [patch 01/35] anaconda policy update david
2008-08-07 14:22   ` Christopher J. PeBenito
2008-08-04 12:34 ` [patch 02/35] kudzu " david
2008-08-14 14:25   ` Christopher J. PeBenito
2008-08-04 12:34 ` [patch 03/35] logrotate " david
2008-08-14 13:26   ` Christopher J. PeBenito
2008-08-04 12:35 ` [patch 04/35] corenetwork " david
2008-08-21 14:40   ` Christopher J. PeBenito
2008-08-21 14:41   ` [refpolicy] " Christopher J. PeBenito
2008-08-25 17:25     ` [refpolicy] cyphesis policy Daniel J Walsh
2008-09-03 14:44       ` Christopher J. PeBenito
2008-08-25 17:29     ` [refpolicy] nsplugin policy Daniel J Walsh
2008-08-25 17:40     ` [refpolicy] Updated kerberos patch to add kprop port definition Daniel J Walsh
2008-08-25 17:44     ` [refpolicy] Updated munin support Daniel J Walsh
2008-08-25 17:52     ` [refpolicy] [patch 04/35] corenetwork policy update Daniel J Walsh
2008-09-03 14:44       ` Christopher J. PeBenito
2008-08-04 12:35 ` david [this message]
2008-08-14 14:25   ` [patch 05/35] courier " Christopher J. PeBenito
2008-08-04 12:35 ` [patch 06/35] soundserver " david
2008-08-07 13:33   ` Christopher J. PeBenito
2008-08-07 15:09     ` Daniel J Walsh
2008-08-11 13:18       ` Christopher J. PeBenito
2008-08-11 14:15         ` Daniel J Walsh
2008-08-11 14:19         ` Daniel J Walsh
2008-08-11 14:22         ` Daniel J Walsh
2008-08-04 12:35 ` [patch 07/35] w3c policy addition david
2008-08-21 14:00   ` [refpolicy] " Christopher J. PeBenito
2008-08-04 12:35 ` [patch 08/35] logging policy update david
2008-08-22 15:25   ` [refpolicy] " Christopher J. PeBenito
2008-08-04 12:35 ` [patch 09/35] xen " david
2008-08-04 12:35 ` [patch 10/35] qemu " david
2008-08-04 12:35 ` [patch 11/35] hotplug " david
2008-08-07 14:23   ` Christopher J. PeBenito
2008-08-04 12:35 ` [patch 12/35] getty " david
2008-08-14 14:25   ` Christopher J. PeBenito
2008-08-04 12:35 ` [patch 13/35] ricci " david
2008-08-07 14:22   ` Christopher J. PeBenito
2008-08-04 12:35 ` [patch 14/35] remotelogin " david
2008-08-14 13:44   ` Christopher J. PeBenito
2008-08-04 12:35 ` [patch 15/35] kernel terminal " david
2008-08-07 13:46   ` Christopher J. PeBenito
2008-08-04 12:35 ` [patch 16/35] usernet policy updates david
2008-08-07 14:22   ` Christopher J. PeBenito
2008-08-04 12:35 ` [patch 17/35] brctl policy update david
2008-08-07 13:47   ` Christopher J. PeBenito
2008-08-07 15:11     ` Daniel J Walsh
2008-08-11 13:20       ` Christopher J. PeBenito
2008-08-04 12:35 ` [patch 18/35] fsadm " david
2008-08-07 13:49   ` Christopher J. PeBenito
2008-08-07 14:10     ` Problem with MLS because /dev is labeled tmpfs_t Dennis Wronka
2008-08-08  2:00       ` Russell Coker
2008-08-09  8:49         ` Dennis Wronka
2008-08-04 12:35 ` [patch 19/35] kernel storage module policy updates david
2008-08-07 14:22   ` Christopher J. PeBenito
2008-08-04 12:35 ` [patch 20/35] rpc policy update david
2008-08-14 14:25   ` Christopher J. PeBenito
2008-08-04 12:35 ` [patch 21/35] kismet " david
2008-08-07 14:22   ` Christopher J. PeBenito
2008-08-04 12:35 ` [patch 22/35] oav policy updates david
2008-08-07 14:22   ` Christopher J. PeBenito
2008-08-04 12:35 ` [patch 23/35] iptables policy update david
2008-08-12 19:57   ` Christopher J. PeBenito
2008-08-04 12:35 ` [patch 24/35] bootloader policy updates david
2008-08-14 14:25   ` Christopher J. PeBenito
2008-08-04 12:35 ` [patch 25/35] rdisc policy update david
2008-08-14 14:25   ` Christopher J. PeBenito
2008-08-04 12:35 ` [patch 26/35] stunnel " david
2008-08-07 14:22   ` Christopher J. PeBenito
2008-08-04 12:35 ` [patch 27/35] inetd " david
2008-08-11 13:50   ` Christopher J. PeBenito
2008-08-04 12:35 ` [patch 28/35] iscsi " david
2008-08-11 14:09   ` Christopher J. PeBenito
2008-08-04 12:35 ` [patch 29/35] ipsec " david
2008-08-11 14:08   ` Christopher J. PeBenito
2008-08-04 12:35 ` [patch 30/35] fetchmail " david
2008-08-07 14:22   ` Christopher J. PeBenito
2008-08-04 12:35 ` [patch 31/35] amanda " david
2008-08-07 14:22   ` Christopher J. PeBenito
2008-08-04 12:35 ` [patch 32/35] rsync " david
2008-08-07 14:22   ` Christopher J. PeBenito
2008-08-04 12:35 ` [patch 33/35] mailscanner policy addition david
2008-08-21 14:06   ` [refpolicy] " Christopher J. PeBenito
2008-08-25 17:18     ` Daniel J Walsh
2008-09-05 12:54       ` Christopher J. PeBenito
2008-09-05 13:57         ` Daniel J Walsh
2008-08-04 12:35 ` [patch 34/35] qmail policy update david
2008-08-11 14:08   ` Christopher J. PeBenito
2008-08-04 12:35 ` [patch 35/35] livecd policy addition david

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=20080804123735.341195390@hardeman.nu \
    --to=david@hardeman.nu \
    --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.