2 * chkpwd.c: a setuid helper program for machines which use shadow passwords
3 * by Nathan Bryant, March 1999
15 #include <sys/types.h>
29 if ((uid = getuid()) != BBSUID)
32 openlog("chkpwd", LOG_CONS, LOG_AUTH);
33 syslog(LOG_WARNING, "invoked by %s (uid %u); possible breakin/probe "
34 "attempt", pw != NULL ? pw->pw_name : "?", uid);
38 if (fgets(buf, sizeof buf, stdin) == NULL)
44 if (fgets(buf, sizeof buf, stdin) == NULL)
49 if (validpw(uid, buf))