From 1f8164e044f2f727b08c28a69bea19cbf49b071b Mon Sep 17 00:00:00 2001 From: Xin Ouyang Date: Fri, 8 Feb 2013 15:16:07 +0800 Subject: [PATCH] libsemange: fix incorrect path for nologin shadow package of oe-core and Debian has installed nologin into /usr/sbin, so fix this path. Upstream-Status: Inappropriate [configuration] Signed-off-by: Xin Ouyang Signed-off-by: Wenzong Fan --- src/genhomedircon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/genhomedircon.c b/src/genhomedircon.c index b9a74b7..d574ee2 100644 --- a/src/genhomedircon.c +++ b/src/genhomedircon.c @@ -60,7 +60,7 @@ /* other paths */ #define PATH_SHELLS_FILE "/etc/shells" -#define PATH_NOLOGIN_SHELL "/sbin/nologin" +#define PATH_NOLOGIN_SHELL "/usr/sbin/nologin" /* comments written to context file */ #define COMMENT_FILE_CONTEXT_HEADER "#\n#\n# " \ @@ -395,7 +395,7 @@ static semanage_list_t *get_home_dirs(genhomedircon_settings_t * s) /* NOTE: old genhomedircon printed a warning on match */ if (hand.matched) { - 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 greater than %u or its login shell is /sbin/nologin.", pwbuf->pw_name, pwbuf->pw_dir, minuid, maxuid); + 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 greater than %u or its login shell is /usr/sbin/nologin.", pwbuf->pw_name, pwbuf->pw_dir, minuid, maxuid); } else { if (semanage_list_push(&homedir_list, path)) goto fail;