Skip to contentSkip to conversation

Resolve denial about logging to journal from chkpwd

PATCH In review Sugar, David 2 participants 4 messages Mar 21, 2019 – Mar 24, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Resolve denial about logging to journal from chkpwd

type=AVC msg=audit(1553029357.588:513): avc: denied { sendto } for pid=7577 comm="unix_chkpwd" path="/dev/log" scontext=toor_u:staff_r:chkpwd_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=unix_dgram_socket permissive=0

---
 policy/modules/system/authlogin.te | 5 +++++
 1 file changed, 5 insertions(+)
policy/modules/system/authlogin.te +5 -0
index 2b7586a2..d0c71285 100644
@@ -144,6 +144,11 @@ ifdef(`distro_ubuntu',`
 	')
 ')
 
+ifdef(`init_systemd',`
+	# for journald /dev/log
+	kernel_dgram_send(chkpwd_t)
+')
+
 optional_policy(`
 	# apache leaks file descriptors
 	apache_dontaudit_rw_tcp_sockets(chkpwd_t)
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 Resolve denial about logging to journal from dbus

type=AVC msg=audit(1553013821.597:9897): avc: denied { sendto } for pid=7377 comm="dbus-daemon" path="/dev/log" scontext=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 tcontext=system_u:system_r:kernel_t:s0 tclass=unix_dgram_socket permissive=1

---
 policy/modules/services/dbus.te | 3 +++
 1 file changed, 3 insertions(+)
policy/modules/services/dbus.te +3 -0
index 24d12c64..fd7e2436 100644
@@ -162,6 +162,9 @@ ifdef(`init_systemd', `
 	# for /run/systemd/dynamic-uid/
 	init_list_pids(system_dbusd_t)
 	init_read_runtime_symlinks(system_dbusd_t)
+
+	# for journald /dev/log
+	kernel_dgram_send(system_dbusd_t)
 ')
 
 optional_policy(`
Signature · 1 line
2.20.1
#2 lore raw

Re: [PATCH 1/1] Resolve denial about logging to journal from dbus

Quoted 12 lines · David

type=AVC msg=audit(1553013821.597:9897): avc: denied { sendto } for pid=7377 comm="dbus-daemon" path="/dev/log" scontext=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 tcontext=system_u:system_r:kernel_t:s0 tclass=unix_dgram_socket permissive=1

---
  policy/modules/services/dbus.te | 3 +++
  1 file changed, 3 insertions(+)
policy/modules/services/dbus.te +0 -0
index 24d12c64..fd7e2436 100644

policy/modules/services/dbus.te ifdef(`init_systemd', ` · line 170

Quoted 9 lines
policy/modules/services/dbus.te +3 -0
@@ -162,6 +162,9 @@ ifdef(`init_systemd', `
  	# for /run/systemd/dynamic-uid/
  	init_list_pids(system_dbusd_t)
  	init_read_runtime_symlinks(system_dbusd_t)
+
+	# for journald /dev/log
+	kernel_dgram_send(system_dbusd_t)
  ')
 
  optional_policy(`

Merged.

Signature · 1 line
Chris PeBenito
#3 lore raw
In reply to Sugar, David
Quoted 13 lines · David

type=AVC msg=audit(1553029357.588:513): avc: denied { sendto } for pid=7577 comm="unix_chkpwd" path="/dev/log" scontext=toor_u:staff_r:chkpwd_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=unix_dgram_socket permissive=0

---
  policy/modules/system/authlogin.te | 5 +++++
  1 file changed, 5 insertions(+)
policy/modules/system/authlogin.te +0 -0
index 2b7586a2..d0c71285 100644
@@ -144,6 +144,11 @@ ifdef(`distro_ubuntu',`
  	')

policy/modules/system/authlogin.te ifdef(`distro_ubuntu',` · line 154

Quoted 10 lines
policy/modules/system/authlogin.te +5 -0
  ')
 
+ifdef(`init_systemd',`
+	# for journald /dev/log
+	kernel_dgram_send(chkpwd_t)
+')
+
  optional_policy(`
  	# apache leaks file descriptors
  	apache_dontaudit_rw_tcp_sockets(chkpwd_t)

Merged.

Signature · 1 line
Chris PeBenito