summaryrefslogtreecommitdiffstats
path: root/lib/pwdcheck.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/pwdcheck.c (renamed from libmisc/pwdcheck.c)8
1 files changed, 5 insertions, 3 deletions
diff --git a/libmisc/pwdcheck.c b/lib/pwdcheck.c
index 15fc3a3..93c9f5c 100644
--- a/libmisc/pwdcheck.c
+++ b/lib/pwdcheck.c
@@ -13,12 +13,14 @@
#include <stdio.h>
#include <shadow.h>
+
+#include "attr.h"
#include "prototypes.h"
#include "defines.h"
#include "pwauth.h"
#include "shadowlog.h"
-void passwd_check (const char *user, const char *passwd, unused const char *progname)
+void passwd_check (const char *user, const char *passwd, MAYBE_UNUSED const char *progname)
{
struct spwd *sp;
@@ -26,7 +28,7 @@ void passwd_check (const char *user, const char *passwd, unused const char *prog
if (NULL != sp) {
passwd = sp->sp_pwdp;
}
- if (pw_auth (passwd, user, PW_LOGIN, (char *) 0) != 0) {
+ if (pw_auth (passwd, user, PW_LOGIN, NULL) != 0) {
SYSLOG ((LOG_WARN, "incorrect password for `%s'", user));
(void) sleep (1);
fprintf (log_get_logfd(), _("Incorrect password for %s.\n"), user);
@@ -34,5 +36,5 @@ void passwd_check (const char *user, const char *passwd, unused const char *prog
}
}
#else /* USE_PAM */
-extern int errno; /* warning: ANSI C forbids an empty source file */
+extern int ISO_C_forbids_an_empty_translation_unit;
#endif /* USE_PAM */