Skip to contentSkip to conversation

plymouth: use the correct running domain for the client

PATCH Superseded Guido Trentalancia 3 participants 6 messages Dec 30, 2016 – Dec 31, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 plymouth: use the correct running domain for the client

The plymouth client needs a domain for short running processes which are started by init scripts instead of an application domain.

---
 policy/modules/contrib/plymouthd.te |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
policy/modules/contrib/plymouthd.te +1 -1
diff -pru a/policy/modules/contrib/plymouthd.te b/policy/modules/contrib/plymouthd.te
@@ -7,7 +7,7 @@ policy_module(plymouthd, 1.3.1)
 
 type plymouth_t;
 type plymouth_exec_t;
-application_domain(plymouth_t, plymouth_exec_t)
+init_system_domain(plymouth_t, plymouth_exec_t)
 role system_r types plymouth_t;
 
 type plymouthd_t;
#1 lore raw

PATCH 1/1 plymouth: use the correct running domain for the client

Quoted 13 lines · Guido Trentalancia via refpolicy

The plymouth client needs a domain for short running processes which are started by init scripts instead of an application domain.

---
 policy/modules/contrib/plymouthd.te |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -pru a/policy/modules/contrib/plymouthd.te b/policy/modules/contrib/plymouthd.te

policy/modules/contrib/plymouthd.te policy_module(plymouthd, 1.3.1) · line 11

Quoted 6 lines
policy/modules/contrib/plymouthd.te +1 -1
@@ -7,7 +7,7 @@ policy_module(plymouthd, 1.3.1)
 
 type plymouth_t;
 type plymouth_exec_t;
-application_domain(plymouth_t, plymouth_exec_t)
+init_system_domain(plymouth_t, plymouth_exec_t)
 role system_r types plymouth_t;

You should probably be able to drop the role system_r types plymouth_t as that is probably already part of init_system_domain() and is thus redundant

Quoted 7 lines
policy/modules/contrib/plymouthd.te +0 -0
 type plymouthd_t;

_______________________________________________
refpolicy mailing list
refpolicy at oss.tresys.com
http://oss.tresys.com/mailman/listinfo/refpolicy

Signature · 11 lines
Key fingerprint = 5F4D 3CDB D3F8 3652 FBD8  02D5 3B6C 5F1D 2C7B 6B02
https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02
Dominick Grift

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 648 bytes
Desc: OpenPGP digital signature
Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20161230/a6c7da7d/attachment-0001.bin 
#2 lore raw

PATCH v2 1/1 plymouth: use the correct running domain for the client

In reply to Guido Trentalancia

The plymouth client needs a domain for short running processes which are started by init scripts instead of an application domain.

Also add the ability to inherit init file descriptors (for the console) and use it.

---
 policy/modules/contrib/plymouthd.te |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
policy/modules/contrib/plymouthd.te +5 -3
diff -pru a/policy/modules/contrib/plymouthd.te b/policy/modules/contrib/plymouthd.te
@@ -7,8 +7,7 @@ policy_module(plymouthd, 1.3.1)
 
 type plymouth_t;
 type plymouth_exec_t;
-application_domain(plymouth_t, plymouth_exec_t)
-role system_r types plymouth_t;
+init_system_domain(plymouth_t, plymouth_exec_t)
 
 type plymouthd_t;
 type plymouthd_exec_t;
@@ -115,12 +114,15 @@ domain_use_interactive_fds(plymouth_t)
 
 files_read_etc_files(plymouth_t)
 
-term_use_ptmx(plymouth_t)
+init_use_fds(plymouth_t)
 
 miscfiles_read_localization(plymouth_t)
 
 sysnet_read_config(plymouth_t)
 
+term_use_console(plymouth_t)
+term_use_ptmx(plymouth_t)
+
 ifdef(`hide_broken_symptoms',`
 	optional_policy(`
 		hal_dontaudit_write_log(plymouth_t)
#3 lore raw

PATCH v2 1/1 plymouth: use the correct running domain for the client

Quoted 26 lines · Guido Trentalancia via refpolicy

The plymouth client needs a domain for short running processes which are started by init scripts instead of an application domain.

Also add the ability to inherit init file descriptors (for the console) and use it.

---
 policy/modules/contrib/plymouthd.te |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff -pru a/policy/modules/contrib/plymouthd.te b/policy/modules/contrib/plymouthd.te

policy/modules/contrib/plymouthd.te +1 -2
@@ -7,8 +7,7 @@ policy_module(plymouthd, 1.3.1)
 
 type plymouth_t;
 type plymouth_exec_t;
-application_domain(plymouth_t, plymouth_exec_t)
-role system_r types plymouth_t;
+init_system_domain(plymouth_t, plymouth_exec_t)
 
 type plymouthd_t;
 type plymouthd_exec_t;

policy/modules/contrib/plymouthd.te domain_use_interactive_fds(plymouth_t) · line 118

Quoted 4 lines
policy/modules/contrib/plymouthd.te +0 -1
@@ -115,12 +114,15 @@ domain_use_interactive_fds(plymouth_t)
 
 files_read_etc_files(plymouth_t)
 
-term_use_ptmx(plymouth_t)

Actually, this is the correct location of the term lines. They shouldn't be moved down.

Quoted 12 lines
policy/modules/contrib/plymouthd.te +4 -0
+init_use_fds(plymouth_t)
 
 miscfiles_read_localization(plymouth_t)
 
 sysnet_read_config(plymouth_t)
 
+term_use_console(plymouth_t)
+term_use_ptmx(plymouth_t)
+
 ifdef(`hide_broken_symptoms',`
 	optional_policy(`
 		hal_dontaudit_write_log(plymouth_t)
Signature · 1 line
Chris PeBenito
#4 lore raw

PATCH v3 1/1 plymouth: use the correct running domain for the client

The plymouth client needs a domain for short running processes which are started by init scripts instead of an application domain.

Also add the ability to inherit init file descriptors (for the console) and use it.

Compared to the previous version (v2), this one simply moves the terminal interfaces to the right location.

---
 policy/modules/contrib/plymouthd.te |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
policy/modules/contrib/plymouthd.te +4 -2
diff -pru a/policy/modules/contrib/plymouthd.te b/policy/modules/contrib/plymouthd.te
@@ -7,8 +7,7 @@ policy_module(plymouthd, 1.3.1)
 
 type plymouth_t;
 type plymouth_exec_t;
-application_domain(plymouth_t, plymouth_exec_t)
-role system_r types plymouth_t;
+init_system_domain(plymouth_t, plymouth_exec_t)
 
 type plymouthd_t;
 type plymouthd_exec_t;
@@ -115,8 +114,11 @@ domain_use_interactive_fds(plymouth_t)
 
 files_read_etc_files(plymouth_t)
 
+term_use_console(plymouth_t)
 term_use_ptmx(plymouth_t)
 
+init_use_fds(plymouth_t)
+
 miscfiles_read_localization(plymouth_t)
 
 sysnet_read_config(plymouth_t)
#5 lore raw

PATCH v3 1/1 plymouth: use the correct running domain for the client

Quoted 30 lines · Guido Trentalancia via refpolicy

The plymouth client needs a domain for short running processes which are started by init scripts instead of an application domain.

Also add the ability to inherit init file descriptors (for the console) and use it.

Compared to the previous version (v2), this one simply moves the terminal interfaces to the right location.

---
 policy/modules/contrib/plymouthd.te |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff -pru a/policy/modules/contrib/plymouthd.te b/policy/modules/contrib/plymouthd.te

policy/modules/contrib/plymouthd.te +1 -2
@@ -7,8 +7,7 @@ policy_module(plymouthd, 1.3.1)
 
 type plymouth_t;
 type plymouth_exec_t;
-application_domain(plymouth_t, plymouth_exec_t)
-role system_r types plymouth_t;
+init_system_domain(plymouth_t, plymouth_exec_t)
 
 type plymouthd_t;
 type plymouthd_exec_t;
@@ -115,8 +114,11 @@ domain_use_interactive_fds(plymouth_t)
 

policy/modules/contrib/plymouthd.te domain_use_interactive_fds(plymouth_t) · line 124

Quoted 10 lines
policy/modules/contrib/plymouthd.te +3 -0
 files_read_etc_files(plymouth_t)
 
+term_use_console(plymouth_t)
 term_use_ptmx(plymouth_t)
 
+init_use_fds(plymouth_t)
+
 miscfiles_read_localization(plymouth_t)
 
 sysnet_read_config(plymouth_t)

Merged.

Signature · 1 line
Chris PeBenito