]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
Accept /usr/sbin/nologin as an alternate to /sbin/nologin
authorChris Hofstaedtler <zeha@debian.org>
Fri, 28 Mar 2025 11:12:13 +0000 (12:12 +0100)
committerAlejandro Colomar <alx@kernel.org>
Sat, 29 Mar 2025 18:50:31 +0000 (19:50 +0100)
Relevant on fully-usr-merged distributions.

Signed-off-by: Chris Hofstaedtler <zeha@debian.org>
Reported-by: Marc Haber
Reviewed-by: Alejandro Colomar <alx@kernel.org>
src/useradd.c
src/usermod.c

index 6e744b042e7e3f8ea30a303405a0a0d6f7d3ef06..84647ee1160dd67909e9fc7a57511c4226c9cdf8 100644 (file)
@@ -1377,6 +1377,7 @@ static void process_flags (int argc, char **argv)
                                if (!streq(optarg, "")
                                     && '*'  != optarg[0]
                                     && !streq(optarg, "/sbin/nologin")
+                                    && !streq(optarg, "/usr/sbin/nologin")
                                     && (   stat(optarg, &st) != 0
                                         || S_ISDIR(st.st_mode)
                                         || access(optarg, X_OK) != 0)) {
index 22113daaa5ebe4a7266a6c25e306f4d78c9a73bd..fc29729a917727246a17a3e32752fd9191588cce 100644 (file)
@@ -1176,6 +1176,7 @@ process_flags(int argc, char **argv)
                                if (!streq(optarg, "")
                                     && '*'  != optarg[0]
                                     && !streq(optarg, "/sbin/nologin")
+                                    && !streq(optarg, "/usr/sbin/nologin")
                                     && (   stat(optarg, &st) != 0
                                         || S_ISDIR(st.st_mode)
                                         || access(optarg, X_OK) != 0)) {