4 * a setuid helper program for machines which use shadow passwords
5 * by Nathan Bryant, March 1999
16 #include <sys/types.h>
20 #include "citadel_dirs.h"
30 char relhome[PATH_MAX]="";
31 char ctdldir[PATH_MAX]=CTDLDIR;
33 /* TODO: should we be able to calculate relative dirs? */
34 calc_dirs_n_files(relh, home, relhome, ctdldir);
38 if (uid != CTDLUID && uid)
41 openlog("chkpwd", LOG_CONS, LOG_AUTH);
42 syslog(LOG_WARNING, "invoked by %s (uid %u); possible breakin/probe "
43 "attempt", pw != NULL ? pw->pw_name : "?", uid);
47 if (fgets(buf, sizeof buf, stdin) == NULL)
53 if (fgets(buf, sizeof buf, stdin) == NULL)
58 if (validpw(uid, buf))