Skip to contentSkip to conversation

mls policy dbus patch

PATCH Xavier Toth 2 participants 2 messages Dec 28, 2007 – Jan 3, 2008 SELinux security module

lore
Share & tools
lore
#0 lore raw
policy/mls 2007-12-21 14:38:52.000000000 -0600 renamed from policy/mls 2007-11-27 14:43:26.000000000 -0600 +5 -1
@@ -584,7 +584,11 @@
 #
 
 # these access vectors have no MLS restrictions
-# dbus { acquire_svc send_msg }
+# dbus { acquire_svc }
+mlsconstrain dbus { send_msg }
+        (( l1 eq l2 ) or
+         ( t1 == mlsdbussend ) or
+         ( t2 == mlsdbusrecv ));
 
 
 

--- serefpolicy-3.0.8/policy/modules/kernel/mls.te 2007-11-27
14:43:26.000000000 -0600
+++ serefpolicy-3.0.8.new/policy/modules/kernel/mls.te 2007-12-21 14:35:30.000000000 -0600
@@ -61,3 +61,6 @@
attribute mlsfdshare;

attribute mlstranslate;
+
+attribute mlsdbusrecv;
+attribute mlsdbussend;
--- serefpolicy-3.0.8/policy/modules/kernel/mls.if 2007-11-27
14:43:26.000000000 -0600
+++ serefpolicy-3.0.8.new/policy/modules/kernel/mls.if 2007-12-21 14:37:31.000000000 -0600
@@ -859,3 +859,42 @@

        typeattribute $1 mlsdbdowngrade;

')
+########################################
+## <summary>
+## Make specified domain MLS trusted
+## for send to dbus.
+## </summary>
+## <param name="domain">

+##      <summary>
+##      Domain allowed access.
+##      </summary>

+## </param>
+## <rolecap/>
+#
+interface(mls_dbus_send',
+ gen_require(`
+ attribute mlsdbussend;
+ ')
+
+ typeattribute $1 mlsdbussend;
+')
+
+########################################
+## <summary>
+## Make specified domain MLS trusted
+## for receiving from dbus.
+## </summary>
+## <param name="domain">

+##      <summary>
+##      Domain allowed access.
+##      </summary>

+## </param>
+## <rolecap/>
+#
+interface(mls_dbus_recv',
+ gen_require(`
+ attribute mlsdbusrecv;
+ ')
+
+ typeattribute $1 mlsdbusrecv;
+')

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#1 lore raw
Quoted 63 lines · Xavier Toth
policy/mls 2007-12-21 14:38:52.000000000 -0600 renamed from policy/mls 2007-11-27 14:43:26.000000000 -0600 +5 -2
@@ -584,7 +584,11 @@
 #
 
 # these access vectors have no MLS restrictions
-# dbus { acquire_svc send_msg }
+# dbus { acquire_svc }
+mlsconstrain dbus { send_msg }
+        (( l1 eq l2 ) or
+         ( t1 == mlsdbussend ) or
+         ( t2 == mlsdbusrecv ));
 
 
 
--- serefpolicy-3.0.8/policy/modules/kernel/mls.te      2007-11-27

14:43:26.000000000 -0600
+++ serefpolicy-3.0.8.new/policy/modules/kernel/mls.te 2007-12-21 14:35:30.000000000 -0600

policy/mls 2007-12-21 14:38:52.000000000 -0600 renamed from policy/mls 2007-11-27 14:43:26.000000000 -0600 +3 -1
@@ -61,3 +61,6 @@
 attribute mlsfdshare;
 
 attribute mlstranslate;
+
+attribute mlsdbusrecv;
+attribute mlsdbussend;
--- serefpolicy-3.0.8/policy/modules/kernel/mls.if      2007-11-27

14:43:26.000000000 -0600
+++ serefpolicy-3.0.8.new/policy/modules/kernel/mls.if 2007-12-21 14:37:31.000000000 -0600

policy/mls 2007-12-21 14:38:52.000000000 -0600 renamed from policy/mls 2007-11-27 14:43:26.000000000 -0600 +29 -0
@@ -859,3 +859,42 @@
 
        typeattribute $1 mlsdbdowngrade;
 ')
+########################################
+## <summary>
+##      Make specified domain MLS trusted
+##      for send to dbus.
+## </summary>
+## <param name="domain">
+##      <summary>
+##      Domain allowed access.
+##      </summary>
+## </param>
+## <rolecap/>
+#
+interface(`mls_dbus_send',`
+       gen_require(`
+               attribute mlsdbussend;
+       ')
+
+       typeattribute $1 mlsdbussend;
+')
+
+########################################
+## <summary>
+##      Make specified domain MLS trusted
+##      for receiving from dbus.
+## </summary>
+## <param name="domain">
+##      <summary>
+##      Domain allowed access.
+##      </summary>

policy/mls 2007-12-21 14:38:52.000000000 -0600 line 900

Quoted 10 lines
policy/mls 2007-12-21 14:38:52.000000000 -0600 renamed from policy/mls 2007-11-27 14:43:26.000000000 -0600 +10 -0
+## </param>
+## <rolecap/>
+#
+interface(`mls_dbus_recv',`
+       gen_require(`
+               attribute mlsdbusrecv;
+       ')
+
+       typeattribute $1 mlsdbusrecv;
+')

Merged, with a few adjustments to the interface names.

Signature · 9 lines
Chris PeBenito
Tresys Technology, LLC
(410) 290-1411 x150


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.