chpasswd: fall back to non-PAM code when prefix is used

The prefix option does not make sense in that scenario and the
encryption options already do this.
This commit is contained in:
Jaroslav Jindrak
2023-05-03 18:59:50 +02:00
committed by Iker Pedrosa
parent 13b0a2bf3b
commit 2d0beef3bb

View 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 */