Skip to content

Commit b4beda8

Browse files
zehaalejandro-colomar
authored andcommitted
Accept /usr/sbin/nologin as an alternate to /sbin/nologin
Relevant on fully-usr-merged distributions. Signed-off-by: Chris Hofstaedtler <[email protected]> Reported-by: Marc Haber Reviewed-by: Alejandro Colomar <[email protected]>
1 parent 7e60522 commit b4beda8

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/useradd.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,6 +1377,7 @@ static void process_flags (int argc, char **argv)
13771377
if (!streq(optarg, "")
13781378
&& '*' != optarg[0]
13791379
&& !streq(optarg, "/sbin/nologin")
1380+
&& !streq(optarg, "/usr/sbin/nologin")
13801381
&& ( stat(optarg, &st) != 0
13811382
|| S_ISDIR(st.st_mode)
13821383
|| access(optarg, X_OK) != 0)) {

src/usermod.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1176,6 +1176,7 @@ process_flags(int argc, char **argv)
11761176
if (!streq(optarg, "")
11771177
&& '*' != optarg[0]
11781178
&& !streq(optarg, "/sbin/nologin")
1179+
&& !streq(optarg, "/usr/sbin/nologin")
11791180
&& ( stat(optarg, &st) != 0
11801181
|| S_ISDIR(st.st_mode)
11811182
|| access(optarg, X_OK) != 0)) {

0 commit comments

Comments
 (0)