commit:     70268bb783c124594191f4c789b5b1eb2277340d
Author:     Antoine Tenart <antoine.tenart <AT> bootlin <DOT> com>
AuthorDate: Mon Sep 14 14:31:54 2020 +0000
Commit:     Jason Zaman <perfinion <AT> gentoo <DOT> org>
CommitDate: Sun Oct 11 21:07:46 2020 +0000
URL:        
https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=70268bb7

dbus: add two interfaces to allow reading from directories and named sockets

Signed-off-by: Antoine Tenart <antoine.tenart <AT> bootlin.com>
Signed-off-by: Jason Zaman <perfinion <AT> gentoo.org>

 policy/modules/services/dbus.if | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/policy/modules/services/dbus.if b/policy/modules/services/dbus.if
index e547337c..13675aaf 100644
--- a/policy/modules/services/dbus.if
+++ b/policy/modules/services/dbus.if
@@ -605,6 +605,24 @@ interface(`dbus_watch_system_bus_runtime_dirs',`
        allow $1 system_dbusd_runtime_t:dir watch;
 ')
 
+########################################
+## <summary>
+##     List system bus runtime directories.
+## </summary>
+## <param name="domain">
+##     <summary>
+##     Domain allowed access.
+##     </summary>
+## </param>
+#
+interface(`dbus_list_system_bus_runtime',`
+       gen_require(`
+               type system_dbusd_runtime_t;
+       ')
+
+       allow $1 system_dbusd_runtime_t:dir list_dir_perms;
+')
+
 ########################################
 ## <summary>
 ##     Watch system bus runtime named sockets.
@@ -623,6 +641,24 @@ interface(`dbus_watch_system_bus_runtime_named_sockets',`
        allow $1 system_dbusd_runtime_t:sock_file watch;
 ')
 
+########################################
+## <summary>
+##     Read system bus runtime named sockets.
+## </summary>
+## <param name="domain">
+##     <summary>
+##     Domain allowed access.
+##     </summary>
+## </param>
+#
+interface(`dbus_read_system_bus_runtime_named_sockets',`
+       gen_require(`
+               type system_dbusd_runtime_t;
+       ')
+
+       allow $1 system_dbusd_runtime_t:sock_file read;
+')
+
 ########################################
 ## <summary>
 ##     Unconfined access to DBUS.

Reply via email to