Skip to contentSkip to conversation

Introduce mutt policy

PATCH Superseded Sven Vermeulen 1 participant 4 messages Oct 28, 2011

lore
Share & tools
lore
#0 lore raw

v3 cover Introduce mutt policy

Please find in the following e-mails an initial policy for the mutt application (terminal e-mail client). The set of mails contains:
- the mutt definition (.te/if/fc)
- adding mutt_role to unprivuser and staff
- update gpg.te to grant it rw access to mutt's tmp files

With respect to the v2 patchset, this patch updates coding style as per Christophers' suggestions and uses the userdom_user_tmp_file() template. It also drops the mutt_role assignment for sysadm_r:sysadm_t.

Wkr,
Sven Vermeulen

#1 lore raw

PATCH v3 1/3 Initial policy for the mutt e-mail client

The mutt e-mail client is a terminal-based e-mail client. It is rich in features (with many additional feature-patches lurking on the internet) so it is assumed that this policy will grow in the future.

---
 mutt.fc |   10 +++++++
 mutt.if |   66 ++++++++++++++++++++++++++++++++++++++++++++
 mutt.te |   93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 169 insertions(+), 0 deletions(-)
 create mode 100644 mutt.fc
 create mode 100644 mutt.if
 create mode 100644 mutt.te
mutt.fc new file +10 -0
new file mode 100644
index 0000000..9d64529
@@ -0,0 +1,10 @@
+HOME_DIR/\.mutt(/.*)?     gen_context(system_u:object_r:mutt_home_t,s0)
+HOME_DIR/\.muttrc      -- gen_context(system_u:object_r:mutt_conf_t,s0)
+HOME_DIR/\.mutt_cache	--	gen_context(system_u:object_r:mutt_home_t,s0)
+HOME_DIR/\.mutt_certificates	--	gen_context(system_u:object_r:mutt_home_t,s0)
+
+/etc/Muttrc	--	gen_context(system_u:object_r:mutt_etc_t,s0)
+/etc/Muttrc\.local	--	gen_context(system_u:object_r:mutt_etc_t,s0)
+/etc/mutt(/.*)?           gen_context(system_u:object_r:mutt_etc_t,s0)
+
+/usr/bin/mutt          -- gen_context(system_u:object_r:mutt_exec_t,s0)
mutt.if new file +66 -0

66 lines not on this page · raw message

mutt.te new file +93 -0

93 lines not on this page · raw message

Signature · 1 line
1.7.3.4
#2 lore raw

PATCH v3 2/3 Allow gpg to read/write mutt e-mail files (for signing)

In reply to Sven Vermeulen

The mutt e-mail files are stored as mutt_tmp_t. As such, gpg needs to be able to read/write to mutt_tmp_t.

---
 gpg.te |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
gpg.te +4 -0
index ebd6791..898bc21 100644
@@ -147,6 +147,10 @@ optional_policy(`
 ')
 
 optional_policy(`
+	mutt_rw_tmp_files(gpg_t)
+')
+
+optional_policy(`
 	xserver_use_xdm_fds(gpg_t)
 	xserver_rw_xdm_pipes(gpg_t)
 ')
Signature · 1 line
1.7.3.4
#3 lore raw

PATCH v3 3/3 Allow users and staff to use mutt

In reply to Sven Vermeulen

Allow the end user domains to use the mutt application.

---
 policy/modules/roles/staff.te      |    4 ++++
 policy/modules/roles/unprivuser.te |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)
policy/modules/roles/staff.te +4 -0
index c10c3d6..8f0f92f 100644
@@ -129,6 +129,10 @@ ifndef(`distro_redhat',`
 	')
 
 	optional_policy(`
+		mutt_role(staff_r, staff_t)
+	')
+
+	optional_policy(`
 		pyzor_role(staff_r, staff_t)
 	')
 
policy/modules/roles/unprivuser.te +4 -0
index c576b6c..ba76cb7 100644
@@ -106,6 +106,10 @@ ifndef(`distro_redhat',`
 	')
 
 	optional_policy(`
+		mutt_role(user_r, user_t)
+	')
+
+	optional_policy(`
 		postgresql_role(user_r, user_t)
 	')
 
Signature · 1 line
1.7.3.4