X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fchkpwd.c;h=96fed66203bfa7fff7be592306d0dbd526c3cb0b;hb=HEAD;hp=76f6c9bb1e5426315417c467bda1e1574eed14a4;hpb=0e50d56538aab7e6fd640ecb7f092a5cb5d67b28;p=citadel.git diff --git a/citadel/chkpwd.c b/citadel/chkpwd.c deleted file mode 100644 index 76f6c9bb1..000000000 --- a/citadel/chkpwd.c +++ /dev/null @@ -1,54 +0,0 @@ -/* - * chkpwd.c: a setuid helper program for machines which use shadow passwords - * by Nathan Bryant, March 1999 - * - * $Id$ - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "auth.h" -#include "config.h" -#include "citadel.h" - -int main(void) -{ - uid_t uid; - struct passwd *pw; - char buf[256]; - - get_config(); - uid = getuid(); - - if (uid != BBSUID && uid) - { - pw = getpwuid(uid); - openlog("chkpwd", LOG_CONS, LOG_AUTH); - syslog(LOG_WARNING, "invoked by %s (uid %u); possible breakin/probe " - "attempt", pw != NULL ? pw->pw_name : "?", uid); - return 1; - } - - if (fgets(buf, sizeof buf, stdin) == NULL) - return 1; - - strtok(buf, "\n"); - uid = atoi(buf); - - if (fgets(buf, sizeof buf, stdin) == NULL) - return 1; - - strtok(buf, "\n"); - - if (validpw(uid, buf)) - return 0; - - return 1; -}