summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXin Ouyang <Xin.Ouyang@windriver.com>2013-02-08 15:16:07 +0800
committerXin Ouyang <Xin.Ouyang@windriver.com>2013-02-17 18:19:01 +0800
commit3570272cd765f271ca3b88556759a83d4bedc950 (patch)
tree32a5eba05c435512ae2f37ce586259894d04925f
parent547150199aec34b59c42c7d6447fe4e465633054 (diff)
downloadmeta-selinux-3570272cd765f271ca3b88556759a83d4bedc950.tar.gz
libsemanage: fix incorrect path for nologin
shadow package of oe-core and Debian has installed nologin into /usr/sbin, so fix this path. Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
-rw-r--r--recipes-security/selinux/libsemanage/libsemanage-fix-path-nologin.patch37
-rw-r--r--recipes-security/selinux/libsemanage_2.1.6.bb5
-rw-r--r--recipes-security/selinux/libsemanage_git.bb5
3 files changed, 43 insertions, 4 deletions
diff --git a/recipes-security/selinux/libsemanage/libsemanage-fix-path-nologin.patch b/recipes-security/selinux/libsemanage/libsemanage-fix-path-nologin.patch
new file mode 100644
index 0000000..7ce586b
--- /dev/null
+++ b/recipes-security/selinux/libsemanage/libsemanage-fix-path-nologin.patch
@@ -0,0 +1,37 @@
1Subject: [PATCH] libsemange: fix incorrect path for nologin
2
3shadow package of oe-core and Debian has installed nologin into
4/usr/sbin, so fix this path.
5
6Upstream-Status: Inappropriate [configuration]
7
8Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
9---
10 src/genhomedircon.c | 4 ++--
11 1 file changed, 2 insertions(+), 2 deletions(-)
12
13diff --git a/src/genhomedircon.c b/src/genhomedircon.c
14index 262a6cd..a50e03d 100644
15--- a/src/genhomedircon.c
16+++ b/src/genhomedircon.c
17@@ -58,7 +58,7 @@
18
19 /* other paths */
20 #define PATH_SHELLS_FILE "/etc/shells"
21-#define PATH_NOLOGIN_SHELL "/sbin/nologin"
22+#define PATH_NOLOGIN_SHELL "/usr/sbin/nologin"
23
24 /* comments written to context file */
25 #define COMMENT_FILE_CONTEXT_HEADER "#\n#\n# " \
26@@ -392,7 +392,7 @@ static semanage_list_t *get_home_dirs(genhomedircon_settings_t * s)
27
28 /* NOTE: old genhomedircon printed a warning on match */
29 if (hand.matched) {
30- WARN(s->h_semanage, "%s homedir %s or its parent directory conflicts with a file context already specified in the policy. This usually indicates an incorrectly defined system account. If it is a system account please make sure its uid is less than %u or its login shell is /sbin/nologin.", pwbuf->pw_name, pwbuf->pw_dir, minuid);
31+ WARN(s->h_semanage, "%s homedir %s or its parent directory conflicts with a file context already specified in the policy. This usually indicates an incorrectly defined system account. If it is a system account please make sure its uid is less than %u or its login shell is /usr/sbin/nologin.", pwbuf->pw_name, pwbuf->pw_dir, minuid);
32 } else {
33 if (semanage_list_push(&homedir_list, path))
34 goto fail;
35--
361.7.9.5
37
diff --git a/recipes-security/selinux/libsemanage_2.1.6.bb b/recipes-security/selinux/libsemanage_2.1.6.bb
index a6825ff..978e72e 100644
--- a/recipes-security/selinux/libsemanage_2.1.6.bb
+++ b/recipes-security/selinux/libsemanage_2.1.6.bb
@@ -1,4 +1,4 @@
1PR = "r3" 1PR = "r4"
2 2
3include selinux_20120216.inc 3include selinux_20120216.inc
4include ${BPN}.inc 4include ${BPN}.inc
@@ -11,4 +11,5 @@ SRC_URI[sha256sum] = "64e6849fe50fb463ec0ba24653a26e3452fa4aaa7d7e192213d5c5a7c5
11SRC_URI += "file://Fix-segfault-for-standard-policy.patch \ 11SRC_URI += "file://Fix-segfault-for-standard-policy.patch \
12 file://libsemanage-Fix-execve-segfaults-on-Ubuntu.patch \ 12 file://libsemanage-Fix-execve-segfaults-on-Ubuntu.patch \
13 file://libsemanage-semanage.conf-for-cross-compile.patch \ 13 file://libsemanage-semanage.conf-for-cross-compile.patch \
14 file://libsemanage-fix-path-len-limit.patch" 14 file://libsemanage-fix-path-len-limit.patch \
15 file://libsemanage-fix-path-nologin.patch"
diff --git a/recipes-security/selinux/libsemanage_git.bb b/recipes-security/selinux/libsemanage_git.bb
index be4623d..562512c 100644
--- a/recipes-security/selinux/libsemanage_git.bb
+++ b/recipes-security/selinux/libsemanage_git.bb
@@ -1,4 +1,4 @@
1PR = "r3" 1PR = "r4"
2PV = "2.1.6+git${SRCPV}" 2PV = "2.1.6+git${SRCPV}"
3 3
4include selinux_git.inc 4include selinux_git.inc
@@ -9,4 +9,5 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343"
9SRC_URI += "file://Fix-segfault-for-standard-policy.patch \ 9SRC_URI += "file://Fix-segfault-for-standard-policy.patch \
10 file://libsemanage-Fix-execve-segfaults-on-Ubuntu.patch \ 10 file://libsemanage-Fix-execve-segfaults-on-Ubuntu.patch \
11 file://libsemanage-semanage.conf-for-cross-compile.patch \ 11 file://libsemanage-semanage.conf-for-cross-compile.patch \
12 file://libsemanage-fix-path-len-limit.patch" 12 file://libsemanage-fix-path-len-limit.patch \
13 file://libsemanage-fix-path-nologin.patch"