policycoreutils: fix genhomedircon construction
PATCH 1/1 policycoreutils: fix genhomedircon construction
CQID: 418197
Reference /usr/sbin instead of the directory into which the script is installed on the host.
Signed-off-by Joe Slater <[email protected]>
--- .../selinux/policycoreutils/scripts_makefile.patch | 26 ++++++++++++++++++++ recipes-security/selinux/policycoreutils_2.1.13.bb | 3 +- 2 files changed, 28 insertions(+), 1 deletions(-) create mode 100644 recipes-security/selinux/policycoreutils/scripts_makefile.patch
recipes-security/selinux/policycoreutils/scripts_makefile.patch new file +26 -0
@@ -0,0 +1,26 @@ +policycoreutils: fix genhomedircon generation + +The script is put on the target and needs to reference +the directory in which semodule is installed. + +Upstream Status: pending + +Signed-off-by: Joe Slater <[email protected]> + +--- a/scripts/Makefile ++++ b/scripts/Makefile +@@ -8,11 +8,12 @@ LOCALEDIR ?= $(PREFIX)/share/locale + + all: fixfiles genhomedircon chcat + ++# we want the script to use the user sbin directory on the target ++# + genhomedircon: + @echo "#!/bin/sh" > genhomedircon + @echo >> genhomedircon +- @if [ ! -e semodule_path ]; then echo -n "$(USRSBINDIR)/" >> genhomedircon; fi +- @if [ -e semodule_path ]; then echo -n "`cat semodule_path`/" >> genhomedircon; fi ++ @echo -n "$(sbindir)/" >> genhomedircon + @echo "semodule -Bn" >> genhomedircon + + install: all
recipes-security/selinux/policycoreutils_2.1.13.bb +2 -1
@@ -1,4 +1,4 @@ -PR = "r2" +PR = "r3" include selinux_20120924.inc include ${BPN}.inc
@@ -11,4 +11,5 @@ SRC_URI[sha256sum] = "34040f06f3111d9ee957576e4095841d35b9ca9141ee8d80aab036cbef SRC_URI += "\ file://policycoreutils-revert-restorecon-update-type.patch \ file://policycoreutils-revert-run_init-open_init_pty.patch \ + file://scripts_makefile.patch \ "
Signature · 1 line
1.7.3.4
Quoted 4 lines · Joe Slater
CQID: 418197
Reference
/usr/sbininstead of the directory into which the script is installed on the host.
This patch and the related audit patch have been applied to both master and dylan branches. Thanks!
--Mark
Quoted 56 lines
Signed-off-by Joe Slater <[email protected]>--- .../selinux/policycoreutils/scripts_makefile.patch | 26 ++++++++++++++++++++ recipes-security/selinux/policycoreutils_2.1.13.bb | 3 +- 2 files changed, 28 insertions(+), 1 deletions(-)create mode 100644
recipes-security/selinux/policycoreutils/scripts_makefile.patchrecipes-security/selinux/policycoreutils/scripts_makefile.patch new file +26
-0@@ -0,0 +1,26 @@ +policycoreutils: fix genhomedircon generation + +The script is put on the target and needs to reference +the directory in which semodule is installed. + +Upstream Status: pending + +Signed-off-by: Joe Slater <[email protected]> + +--- a/scripts/Makefile ++++ b/scripts/Makefile +@@ -8,11 +8,12 @@ LOCALEDIR ?= $(PREFIX)/share/locale + + all: fixfiles genhomedircon chcat + ++# we want the script to use the user sbin directory on the target ++# + genhomedircon: + @echo "#!/bin/sh" > genhomedircon + @echo >> genhomedircon +- @if [ ! -e semodule_path ]; then echo -n "$(USRSBINDIR)/" >> genhomedircon; fi +- @if [ -e semodule_path ]; then echo -n "`cat semodule_path`/" >> genhomedircon; fi ++ @echo -n "$(sbindir)/" >> genhomedircon + @echo "semodule -Bn" >> genhomedircon + + install: allrecipes-security/selinux/policycoreutils_2.1.13.bb +2
-1@@ -1,4 +1,4 @@ -PR = "r2" +PR = "r3" include selinux_20120924.inc include ${BPN}.inc@@ -11,4 +11,5 @@ SRC_URI[sha256sum] = "34040f06f3111d9ee957576e4095841d35b9ca9141ee8d80aab036cbef SRC_URI += "\ file://policycoreutils-revert-restorecon-update-type.patch \ file://policycoreutils-revert-run_init-open_init_pty.patch \ + file://scripts_makefile.patch \ "