Skip to contentSkip to conversation

chkrootkit: add interfaces and sysadm permit

PATCH New Christian Göttsche 2 participants 2 messages Jun 9, 2017 – Jun 12, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 chkrootkit: add interfaces and sysadm permit

From: cgzones <[email protected]>

v2:
- add bin_t fc to corecommands

---
 policy/modules/kernel/corecommands.fc |  1 +
 policy/modules/roles/sysadm.te        |  4 ++++
 policy/modules/system/init.if         | 18 ++++++++++++++++++
 3 files changed, 23 insertions(+)
policy/modules/kernel/corecommands.fc +1 -0
index 1033a9738..d30445437 100644
@@ -416,6 +416,7 @@ ifdef(`distro_suse', `
 /var/ftp/bin(/.*)?			gen_context(system_u:object_r:bin_t,s0)
 
 /var/lib/asterisk/agi-bin(/.*)?		gen_context(system_u:object_r:bin_t,s0)
+/usr/lib/chkrootkit/.*		--	gen_context(system_u:object_r:bin_t,s0)
 /usr/lib/yp/.+			--	gen_context(system_u:object_r:bin_t,s0)
 
 /var/qmail/bin			-d	gen_context(system_u:object_r:bin_t,s0)
policy/modules/roles/sysadm.te +4 -0
index c4158c507..fa6b166d2 100644
@@ -236,6 +236,10 @@ optional_policy(`
 ')
 
 optional_policy(`
+	chkrootkit_run(sysadm_t, sysadm_r)
+')
+
+optional_policy(`
 	chronyd_admin(sysadm_t, sysadm_r)
 ')
 
policy/modules/system/init.if +18 -0
index 942845362..11531cfb2 100644
@@ -679,6 +679,24 @@ interface(`init_getpgid',`
 
 ########################################
 ## <summary>
+##	Send init a generic signal.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+#
+interface(`init_signal',`
+	gen_require(`
+		type init_t;
+	')
+
+	allow $1 init_t:process signal;
+')
+
+########################################
+## <summary>
 ##	Send init a null signal.
 ## </summary>
 ## <param name="domain">
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/1 chkrootkit: add interfaces and sysadm permit

Quoted 50 lines · Christian G?ttsche via refpolicy

From: cgzones <[email protected]>

v2:
- add bin_t fc to corecommands

---
 policy/modules/kernel/corecommands.fc |  1 +
 policy/modules/roles/sysadm.te        |  4 ++++
 policy/modules/system/init.if         | 18 ++++++++++++++++++
 3 files changed, 23 insertions(+)
policy/modules/kernel/corecommands.fc +1 -0
index 1033a9738..d30445437 100644
@@ -416,6 +416,7 @@ ifdef(`distro_suse', `
 /var/ftp/bin(/.*)?			gen_context(system_u:object_r:bin_t,s0)
 
 /var/lib/asterisk/agi-bin(/.*)?		gen_context(system_u:object_r:bin_t,s0)
+/usr/lib/chkrootkit/.*		--	gen_context(system_u:object_r:bin_t,s0)
 /usr/lib/yp/.+			--	gen_context(system_u:object_r:bin_t,s0)
 
 /var/qmail/bin			-d	gen_context(system_u:object_r:bin_t,s0)
policy/modules/roles/sysadm.te +4 -0
index c4158c507..fa6b166d2 100644
@@ -236,6 +236,10 @@ optional_policy(`
 ')
 
 optional_policy(`
+	chkrootkit_run(sysadm_t, sysadm_r)
+')
+
+optional_policy(`
 	chronyd_admin(sysadm_t, sysadm_r)
 ')
 
policy/modules/system/init.if +5 -0
index 942845362..11531cfb2 100644
@@ -679,6 +679,24 @@ interface(`init_getpgid',`
 
 ########################################
 ## <summary>
+##	Send init a generic signal.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.

policy/modules/system/init.if interface(`init_getpgid',` · line 696

Quoted 10 lines
policy/modules/system/init.if +10 -0
+##	</summary>
+## </param>
+#
+interface(`init_signal',`
+	gen_require(`
+		type init_t;
+	')
+
+	allow $1 init_t:process signal;
+')

Merged.

Signature · 1 line
Chris PeBenito