/*
- * chkpwd.c: a setuid helper program for machines which use shadow passwords
+ * $Id$
+ *
+ * a setuid helper program for machines which use shadow passwords
* by Nathan Bryant, March 1999
*
- * $Id$
*/
#include <pwd.h>
char buf[256];
get_config();
+ uid = getuid();
- if ((uid = getuid()) != BBSUID)
+ if (uid != BBSUID && uid)
{
pw = getpwuid(uid);
openlog("chkpwd", LOG_CONS, LOG_AUTH);