* libmisc/pwdcheck.c (passwd_check): The progname is not used.

* libmisc/pwdcheck.c: Ignore the return value of sleep().
	* libmisc/pwdcheck.c: Use exit(EXIT_FAILURE) instead of exit(1).
This commit is contained in:
nekral-guest 2009-04-23 20:17:02 +00:00
parent c357e94283
commit 3d2f164dca
2 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2009-04-22 Nicolas François <nicolas.francois@centraliens.net>
* libmisc/pwdcheck.c (passwd_check): The progname is not used.
* libmisc/pwdcheck.c: Ignore the return value of sleep().
* libmisc/pwdcheck.c: Use exit(EXIT_FAILURE) instead of exit(1).
2009-04-22 Nicolas François <nicolas.francois@centraliens.net>
* libmisc/setupenv.c: Avoid assignments in comparisons.

View File

@ -40,7 +40,7 @@
#include "defines.h"
#include "pwauth.h"
void passwd_check (const char *user, const char *passwd, const char *progname)
void passwd_check (const char *user, const char *passwd, unused const char *progname)
{
struct spwd *sp;
@ -50,9 +50,9 @@ void passwd_check (const char *user, const char *passwd, const char *progname)
}
if (pw_auth (passwd, user, PW_LOGIN, (char *) 0) != 0) {
SYSLOG ((LOG_WARN, "incorrect password for `%s'", user));
sleep (1);
(void) sleep (1);
fprintf (stderr, _("Incorrect password for %s.\n"), user);
exit (1);
exit (EXIT_FAILURE);
}
}
#else /* USE_PAM */