]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
chpasswd: fall back to non-PAM code when prefix is used
authorJaroslav Jindrak <dzejrou@gmail.com>
Wed, 3 May 2023 16:59:50 +0000 (18:59 +0200)
committerIker Pedrosa <ikerpedrosam@gmail.com>
Fri, 9 Jun 2023 14:22:24 +0000 (16:22 +0200)
The prefix option does not make sense in that scenario and the
encryption options already do this.

src/chpasswd.c

index 3dec07966cfebf534e3f574d9183823c80ecbb4b..1a1a5d59985448a7a3990c78e692d217a2c71ff5 100644 (file)
@@ -471,7 +471,7 @@ int main (int argc, char **argv)
        prefix = process_prefix_flag ("-P", argc, argv);
 
 #ifdef USE_PAM
-       if (md5flg || eflg || cflg) {
+       if (md5flg || eflg || cflg || prefix[0]) {
                use_pam = false;
        }
 #endif                         /* USE_PAM */