Skip to contentSkip to conversation

libraries: update wildcard /usr/lib fcontext

PATCH New Jason Zaman 2 participants 7 messages May 7, 2017 – May 11, 2017 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 libraries: update wildcard /usr/lib fcontext

subs_dist takes care of it, the wildcard is no longer needed

---
 policy/modules/system/libraries.fc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
policy/modules/system/libraries.fc +1 -1
index 94f875d..1e76176 100644
@@ -227,7 +227,7 @@ HOME_DIR/.*/plugins/nppdf\.so.* 	--	gen_context(system_u:object_r:textrel_shlib_
 /usr/lib/ocaml/stublibs/dllnums\.so	--	gen_context(system_u:object_r:textrel_shlib_t,s0)
 
 # Livna.org packages: xmms-mp3, ffmpeg, xvidcore, xine-lib, gsm, lame
-/usr/lib.*/libmpg123\.so(\.[^/]*)*	--	gen_context(system_u:object_r:textrel_shlib_t,s0)
+/usr/lib/libmpg123\.so(\.[^/]*)*	--	gen_context(system_u:object_r:textrel_shlib_t,s0)
 /usr/local(/.*)?/libmpg123\.so(\.[^/]*)* --	gen_context(system_u:object_r:textrel_shlib_t,s0)
 /usr/lib/codecs/drv[1-9c]\.so(\.[^/]*)* --	gen_context(system_u:object_r:textrel_shlib_t,s0)
 
Signature · 1 line
2.10.2
#1 lore raw

PATCH 2/4 appconfig: Add openrc_contexts file

---
 Makefile                                  | 2 +-
 config/appconfig-mcs/openrc_contexts      | 1 +
 config/appconfig-mls/openrc_contexts      | 1 +
 config/appconfig-standard/openrc_contexts | 1 +
 4 files changed, 4 insertions(+), 1 deletion(-)
 create mode 100644 config/appconfig-mcs/openrc_contexts
 create mode 100644 config/appconfig-mls/openrc_contexts
 create mode 100644 config/appconfig-standard/openrc_contexts
Makefile +1 -1
index 2824a75..d19985e 100644
@@ -255,7 +255,7 @@ seusers := $(appconf)/seusers
 appdir := $(contextpath)
 user_default_contexts := $(wildcard config/appconfig-$(TYPE)/*_default_contexts)
 user_default_contexts_names := $(addprefix $(contextpath)/users/,$(subst _default_contexts,,$(notdir $(user_default_contexts))))
-appfiles := $(addprefix $(appdir)/,default_contexts default_type initrc_context failsafe_context userhelper_context removable_context dbus_contexts sepgsql_contexts x_contexts customizable_types securetty_types lxc_contexts virtual_domain_context virtual_image_context) $(contextpath)/files/media $(fcsubspath) $(user_default_contexts_names)
+appfiles := $(addprefix $(appdir)/,default_contexts default_type initrc_context failsafe_context userhelper_context removable_context dbus_contexts sepgsql_contexts x_contexts customizable_types securetty_types lxc_contexts openrc_contexts virtual_domain_context virtual_image_context) $(contextpath)/files/media $(fcsubspath) $(user_default_contexts_names)
 net_contexts := $(builddir)net_contexts
 
 all_layers := $(shell find $(wildcard $(moddir)/*) -maxdepth 0 -type d)
config/appconfig-mcs/openrc_contexts new file +1 -0
new file mode 100644
index 0000000..72f1894
@@ -0,0 +1 @@
+run_init=run_init_t
config/appconfig-mls/openrc_contexts new file +1 -0
new file mode 100644
index 0000000..72f1894
@@ -0,0 +1 @@
+run_init=run_init_t
config/appconfig-standard/openrc_contexts new file +1 -0
new file mode 100644
index 0000000..72f1894
@@ -0,0 +1 @@
+run_init=run_init_t
Signature · 1 line
2.10.2
#2 lore raw

PATCH 2/4 appconfig: Add openrc_contexts file

Quoted 43 lines · Jason Zaman
---
 Makefile                                  | 2 +-
 config/appconfig-mcs/openrc_contexts      | 1 +
 config/appconfig-mls/openrc_contexts      | 1 +
 config/appconfig-standard/openrc_contexts | 1 +
 4 files changed, 4 insertions(+), 1 deletion(-)
 create mode 100644 config/appconfig-mcs/openrc_contexts
 create mode 100644 config/appconfig-mls/openrc_contexts
 create mode 100644 config/appconfig-standard/openrc_contexts
Makefile +1 -1
index 2824a75..d19985e 100644
@@ -255,7 +255,7 @@ seusers := $(appconf)/seusers
 appdir := $(contextpath)
 user_default_contexts := $(wildcard config/appconfig-$(TYPE)/*_default_contexts)
 user_default_contexts_names := $(addprefix $(contextpath)/users/,$(subst _default_contexts,,$(notdir $(user_default_contexts))))
-appfiles := $(addprefix $(appdir)/,default_contexts default_type initrc_context failsafe_context userhelper_context removable_context dbus_contexts sepgsql_contexts x_contexts customizable_types securetty_types lxc_contexts virtual_domain_context virtual_image_context) $(contextpath)/files/media $(fcsubspath) $(user_default_contexts_names)
+appfiles := $(addprefix $(appdir)/,default_contexts default_type initrc_context failsafe_context userhelper_context removable_context dbus_contexts sepgsql_contexts x_contexts customizable_types securetty_types lxc_contexts openrc_contexts virtual_domain_context virtual_image_context) $(contextpath)/files/media $(fcsubspath) $(user_default_contexts_names)
 net_contexts := $(builddir)net_contexts
 
 all_layers := $(shell find $(wildcard $(moddir)/*) -maxdepth 0 -type d)
config/appconfig-mcs/openrc_contexts new file +1 -0
new file mode 100644
index 0000000..72f1894
@@ -0,0 +1 @@
+run_init=run_init_t
config/appconfig-mls/openrc_contexts new file +1 -0
new file mode 100644
index 0000000..72f1894
@@ -0,0 +1 @@
+run_init=run_init_t
config/appconfig-standard/openrc_contexts new file +0 -0
new file mode 100644
index 0000000..72f1894

config/appconfig-standard/openrc_contexts line 1

Quoted 1 line
config/appconfig-standard/openrc_contexts new file +1 -0
@@ -0,0 +1 @@
+run_init=run_init_t

Merged.

Signature · 1 line
Chris PeBenito
#3 lore raw

PATCH 3/4 dirmngr: add to roles

In reply to Jason Zaman
---
 policy/modules/roles/staff.te      | 4 ++++
 policy/modules/roles/sysadm.te     | 4 ++++
 policy/modules/roles/unprivuser.te | 4 ++++
 3 files changed, 12 insertions(+)
policy/modules/roles/staff.te +4 -0
index 27c2fff..0efba38 100644
@@ -101,6 +101,10 @@ ifndef(`distro_redhat',`
 	')
 
 	optional_policy(`
+		dirmngr_role(staff_r, staff_t)
+	')
+
+	optional_policy(`
 		evolution_role(staff_r, staff_t)
 	')
 
policy/modules/roles/sysadm.te +4 -0
index 54df435..02a1e65 100644
@@ -1261,6 +1261,10 @@ ifndef(`distro_redhat',`
 	')
 
 	optional_policy(`
+		dirmngr_role(sysadm_r, sysadm_t)
+	')
+
+	optional_policy(`
 		evolution_role(sysadm_r, sysadm_t)
 	')
 
policy/modules/roles/unprivuser.te +4 -0
index 1cf53e1..debbfe3 100644
@@ -70,6 +70,10 @@ ifndef(`distro_redhat',`
 	')
 
 	optional_policy(`
+		dirmngr_role(user_r, user_t)
+	')
+
+	optional_policy(`
 		evolution_role(user_r, user_t)
 	')
 
Signature · 1 line
2.10.2
#4 lore raw

PATCH 4/4 corecommands: add consolekit fcontexts

In reply to Jason Zaman
---
 policy/modules/kernel/corecommands.fc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
policy/modules/kernel/corecommands.fc +3 -2
index d931a31..1033a97 100644
@@ -171,8 +171,10 @@ ifdef(`distro_gentoo',`
 /usr/lib/qt.*/bin(/.*)?			gen_context(system_u:object_r:bin_t,s0)
 /usr/lib/wicd/monitor\.py 	-- 	gen_context(system_u:object_r:bin_t, s0)
 /usr/lib/apt/methods.+		--	gen_context(system_u:object_r:bin_t,s0)
+/usr/lib/ConsoleKit/.*		--	gen_context(system_u:object_r:bin_t,s0)
+/usr/lib/ConsoleKit/run-seat.d(/.*)?	gen_context(system_u:object_r:bin_t,s0)
+/usr/lib/ConsoleKit/run-session.d(/.*)?	gen_context(system_u:object_r:bin_t,s0)
 /usr/lib/ConsoleKit/scripts(/.*)?	gen_context(system_u:object_r:bin_t,s0)
-/usr/lib/ConsoleKit/run-session.d(/.*)? gen_context(system_u:object_r:bin_t,s0)
 /usr/lib/courier(/.*)?			gen_context(system_u:object_r:bin_t,s0)
 /usr/lib/cups(/.*)? 			gen_context(system_u:object_r:bin_t,s0)
 /usr/lib/cyrus/.*		--	gen_context(system_u:object_r:bin_t,s0)
@@ -327,7 +329,6 @@ ifdef(`distro_gentoo',`
 /usr/X11R6/lib(64)?/X11/xkb/xkbcomp --	gen_context(system_u:object_r:bin_t,s0)
 
 ifdef(`distro_debian',`
-/usr/lib/ConsoleKit/.*		--	gen_context(system_u:object_r:bin_t,s0)
 /usr/lib/gdm3/.*		--	gen_context(system_u:object_r:bin_t,s0)
 /usr/lib/udisks/.*		--	gen_context(system_u:object_r:bin_t,s0)
 /usr/share/bug/.*		--	gen_context(system_u:object_r:bin_t,s0)
Signature · 1 line
2.10.2
#5 lore raw

PATCH 4/4 corecommands: add consolekit fcontexts

Quoted 21 lines · Jason Zaman
---
 policy/modules/kernel/corecommands.fc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
policy/modules/kernel/corecommands.fc +3 -1
index d931a31..1033a97 100644
@@ -171,8 +171,10 @@ ifdef(`distro_gentoo',`
 /usr/lib/qt.*/bin(/.*)?			gen_context(system_u:object_r:bin_t,s0)
 /usr/lib/wicd/monitor\.py 	-- 	gen_context(system_u:object_r:bin_t, s0)
 /usr/lib/apt/methods.+		--	gen_context(system_u:object_r:bin_t,s0)
+/usr/lib/ConsoleKit/.*		--	gen_context(system_u:object_r:bin_t,s0)
+/usr/lib/ConsoleKit/run-seat.d(/.*)?	gen_context(system_u:object_r:bin_t,s0)
+/usr/lib/ConsoleKit/run-session.d(/.*)?	gen_context(system_u:object_r:bin_t,s0)
 /usr/lib/ConsoleKit/scripts(/.*)?	gen_context(system_u:object_r:bin_t,s0)
-/usr/lib/ConsoleKit/run-session.d(/.*)? gen_context(system_u:object_r:bin_t,s0)
 /usr/lib/courier(/.*)?			gen_context(system_u:object_r:bin_t,s0)
 /usr/lib/cups(/.*)? 			gen_context(system_u:object_r:bin_t,s0)
 /usr/lib/cyrus/.*		--	gen_context(system_u:object_r:bin_t,s0)

policy/modules/kernel/corecommands.fc ifdef(`distro_gentoo',` · line 334

Quoted 7 lines
policy/modules/kernel/corecommands.fc +0 -1
@@ -327,7 +329,6 @@ ifdef(`distro_gentoo',`
 /usr/X11R6/lib(64)?/X11/xkb/xkbcomp --	gen_context(system_u:object_r:bin_t,s0)
 
 ifdef(`distro_debian',`
-/usr/lib/ConsoleKit/.*		--	gen_context(system_u:object_r:bin_t,s0)
 /usr/lib/gdm3/.*		--	gen_context(system_u:object_r:bin_t,s0)
 /usr/lib/udisks/.*		--	gen_context(system_u:object_r:bin_t,s0)
 /usr/share/bug/.*		--	gen_context(system_u:object_r:bin_t,s0)

Merged.

Signature · 1 line
Chris PeBenito
#6 lore raw

PATCH 1/4 libraries: update wildcard /usr/lib fcontext

In reply to Jason Zaman
Quoted 10 lines · Jason Zaman

subs_dist takes care of it, the wildcard is no longer needed

---
 policy/modules/system/libraries.fc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
policy/modules/system/libraries.fc +0 -0
index 94f875d..1e76176 100644

policy/modules/system/libraries.fc HOME_DIR/.*/plugins/nppdf\.so.* -- gen_context(system_u:object_r:textrel_shlib_ · line 232

Quoted 7 lines
policy/modules/system/libraries.fc +1 -1
@@ -227,7 +227,7 @@ HOME_DIR/.*/plugins/nppdf\.so.* 	--	gen_context(system_u:object_r:textrel_shlib_
 /usr/lib/ocaml/stublibs/dllnums\.so	--	gen_context(system_u:object_r:textrel_shlib_t,s0)
 
 # Livna.org packages: xmms-mp3, ffmpeg, xvidcore, xine-lib, gsm, lame
-/usr/lib.*/libmpg123\.so(\.[^/]*)*	--	gen_context(system_u:object_r:textrel_shlib_t,s0)
+/usr/lib/libmpg123\.so(\.[^/]*)*	--	gen_context(system_u:object_r:textrel_shlib_t,s0)
 /usr/local(/.*)?/libmpg123\.so(\.[^/]*)* --	gen_context(system_u:object_r:textrel_shlib_t,s0)
 /usr/lib/codecs/drv[1-9c]\.so(\.[^/]*)* --	gen_context(system_u:object_r:textrel_shlib_t,s0)

Merged.

Signature · 1 line
Chris PeBenito