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