Improve commonalities between chgpasswd and chpasswd.
This commit is contained in:
parent
69b276a712
commit
e5e00ce9d6
@ -130,7 +130,7 @@ static void usage (void)
|
|||||||
" crypt algorithms\n")
|
" crypt algorithms\n")
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
exit (1);
|
exit (E_USAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -221,12 +221,12 @@ static void check_flags (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (cflg) {
|
if (cflg) {
|
||||||
if ( 0 != strcmp (crypt_method, "DES")
|
if ( (0 != strcmp (crypt_method, "DES"))
|
||||||
&& 0 != strcmp (crypt_method, "MD5")
|
&& (0 != strcmp (crypt_method, "MD5"))
|
||||||
&& 0 != strcmp (crypt_method, "NONE")
|
&& (0 != strcmp (crypt_method, "NONE"))
|
||||||
#ifdef USE_SHA_CRYPT
|
#ifdef USE_SHA_CRYPT
|
||||||
&& 0 != strcmp (crypt_method, "SHA256")
|
&& (0 != strcmp (crypt_method, "SHA256"))
|
||||||
&& 0 != strcmp (crypt_method, "SHA512")
|
&& (0 != strcmp (crypt_method, "SHA512"))
|
||||||
#endif
|
#endif
|
||||||
) {
|
) {
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
@ -498,8 +498,7 @@ int main (int argc, char **argv)
|
|||||||
|
|
||||||
if (0 == ok) {
|
if (0 == ok) {
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
_
|
_("%s: line %d: cannot update group entry\n"),
|
||||||
("%s: line %d: cannot update group entry\n"),
|
|
||||||
Prog, line);
|
Prog, line);
|
||||||
errors++;
|
errors++;
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user