Skip to contentSkip to conversation

For restricted_xwindows_user, the gnome_role_template depends on the wm_role_template, which depends on the dbus_role_template

PATCH New Dominick Grift 2 participants 5 messages Sep 20, 2013 – Sep 24, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 For restricted_xwindows_user, the gnome_role_template depends on the wm_role_template, which depends on the dbus_role_template

policy/modules/system/userdomain.if +4 -4
index b4a691d..8cd6269 100644
@@ -942,11 +942,11 @@
 		')
 
 		optional_policy(`
-			gnome_role_template($1, $1_r, $1_t)
-		')
-
-		optional_policy(`
 			wm_role_template($1, $1_r, $1_t)
+
+			optional_policy(`
+				gnome_role_template($1, $1_r, $1_t)
+			')
 		')
 	')
 
#1 lore raw

PATCH 1/1 For restricted_xwindows_user, the gnome_role_template depends on the wm_role_template, which depends on the dbus_role_template

Quoted 1 line · Dominick Grift

This is kind of nasty but this is basically needed for restricted xwindows users (Fedora probably only targeted to xguest) in an MLS environment.

The problem here is that we, and fedora, currently run gnome-shell in the window manager domain for restricted xwindows users (xguest).

To be honest, i don't believe this is sufficient anyways. Although it might just be enough for xguest

We should probably have thought about this much earlier

Quoted 20 lines
policy/modules/system/userdomain.if +4 -4
index b4a691d..8cd6269 100644
@@ -942,11 +942,11 @@
 		')
 
 		optional_policy(`
-			gnome_role_template($1, $1_r, $1_t)
-		')
-
-		optional_policy(`
 			wm_role_template($1, $1_r, $1_t)
+
+			optional_policy(`
+				gnome_role_template($1, $1_r, $1_t)
+			')
 		')
 	')
 
#2 lore raw

PATCH 1/1 For restricted_xwindows_user, the gnome_role_template depends on the wm_role_template, which depends on the dbus_role_template

Quoted 7 lines · Dominick Grift
Quoted 1 line · Dominick Grift

This is kind of nasty but this is basically needed for restricted xwindows users (Fedora probably only targeted to xguest) in an MLS environment.

Quoted 7 lines

The problem here is that we, and fedora, currently run gnome-shell in the window manager domain for restricted xwindows users (xguest).

To be honest, i don't believe this is sufficient anyways. Although it might just be enough for xguest

We should probably have thought about this much earlier

So if that's the case, shouldn't it instead be changed to the below?

optional_policy(`
gnome_role_template($1, $1_r, $1_t)
wm_role_template($1, $1_r, $1_t)
')

If I understand you correctly, if you have wm and no gnome, it breaks.

Quoted 7 lines
Quoted 7 lines
policy/modules/system/userdomain.if +0 -0
index b4a691d..8cd6269 100644
@@ -942,11 +942,11 @@
 		')
 
Quoted 12 lines

policy/modules/system/userdomain.if line 951

Quoted 12 lines
policy/modules/system/userdomain.if +4 -4
 		optional_policy(`
-			gnome_role_template($1, $1_r, $1_t)
-		')
-
-		optional_policy(`
 			wm_role_template($1, $1_r, $1_t)
+
+			optional_policy(`
+				gnome_role_template($1, $1_r, $1_t)
+			')
 		')
 	')

--
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com

#3 lore raw

PATCH 1/1 For restricted_xwindows_user, the gnome_role_template depends on the wm_role_template, which depends on the dbus_role_template

Quoted 16 lines · Christopher J. PeBenito
Quoted 7 lines · Dominick Grift
Quoted 1 line · Dominick Grift

This is kind of nasty but this is basically needed for restricted xwindows users (Fedora probably only targeted to xguest) in an MLS environment.

Quoted 7 lines

The problem here is that we, and fedora, currently run gnome-shell in the window manager domain for restricted xwindows users (xguest).

To be honest, i don't believe this is sufficient anyways. Although it might just be enough for xguest

We should probably have thought about this much earlier

Quoted 8 lines

So if that's the case, shouldn't it instead be changed to the below?

optional_policy(`
gnome_role_template($1, $1_r, $1_t)
wm_role_template($1, $1_r, $1_t)
')

If I understand you correctly, if you have wm and no gnome, it breaks.

For some reason that wont work, its strange but if i try the above then the wm role template does not work but the gnome role template does ( i tried in monolithic policy )

e.g. there wont be any xguest_wm_t type but there will be a xguest_gkeyringd_t type

wm_role_template really needs to be nested as optional policy under gnome_role_template as shown below

You dont have to take my word for it, you can just try it out and see what happens

This dependency stuff is really blowing my mind sometimes

Quoted 25 lines
Quoted 8 lines
Quoted 8 lines
policy/modules/system/userdomain.if +0 -0
index b4a691d..8cd6269 100644
@@ -942,11 +942,11 @@
 		')
 
Quoted 12 lines

policy/modules/system/userdomain.if line 951

Quoted 12 lines
policy/modules/system/userdomain.if +4 -4
 		optional_policy(`
-			gnome_role_template($1, $1_r, $1_t)
-		')
-
-		optional_policy(`
 			wm_role_template($1, $1_r, $1_t)
+
+			optional_policy(`
+				gnome_role_template($1, $1_r, $1_t)
+			')
 		')
 	')

--
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com

#4 lore raw

PATCH 1/1 For restricted_xwindows_user, the gnome_role_template depends on the wm_role_template, which depends on the dbus_role_template

Quoted 33 lines · Dominick Grift
Quoted 16 lines · Christopher J. PeBenito
Quoted 7 lines · Dominick Grift
Quoted 1 line · Dominick Grift

This is kind of nasty but this is basically needed for restricted xwindows users (Fedora probably only targeted to xguest) in an MLS environment.

Quoted 7 lines

The problem here is that we, and fedora, currently run gnome-shell in the window manager domain for restricted xwindows users (xguest).

To be honest, i don't believe this is sufficient anyways. Although it might just be enough for xguest

We should probably have thought about this much earlier

Quoted 8 lines

So if that's the case, shouldn't it instead be changed to the below?

optional_policy(`
gnome_role_template($1, $1_r, $1_t)
wm_role_template($1, $1_r, $1_t)
')

If I understand you correctly, if you have wm and no gnome, it breaks.

For some reason that wont work, its strange but if i try the above then the wm role template does not work but the gnome role template does ( i tried in monolithic policy )

e.g. there wont be any xguest_wm_t type but there will be a xguest_gkeyringd_t type

Quoted 8 lines

wm_role_template really needs to be nested as optional policy under gnome_role_template as shown below

You dont have to take my word for it, you can just try it out and see what happens

This dependency stuff is really blowing my mind sometimes

Scratch the above, i think it does work actually

i had the rule from contrib that i use to verify whether it works commented out (pending adoption of this patch ) but the xguest_wm_t type was there so yes it works thats the only sensible outcome

so i will just go ahead and send you a patch with your requested change

Quoted 27 lines
Quoted 25 lines
Quoted 8 lines
Quoted 8 lines
policy/modules/system/userdomain.if +0 -0
index b4a691d..8cd6269 100644
@@ -942,11 +942,11 @@
 		')
 
Quoted 12 lines

policy/modules/system/userdomain.if line 951

Quoted 12 lines
policy/modules/system/userdomain.if +4 -4
 		optional_policy(`
-			gnome_role_template($1, $1_r, $1_t)
-		')
-
-		optional_policy(`
 			wm_role_template($1, $1_r, $1_t)
+
+			optional_policy(`
+				gnome_role_template($1, $1_r, $1_t)
+			')
 		')
 	')

--
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com