X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fchkpwd.c;h=96fed66203bfa7fff7be592306d0dbd526c3cb0b;hb=HEAD;hp=b96ac7392a54845d964fbd9572ffdde486864d24;hpb=83875cf99a93ec708989894477f3880cf4579630;p=citadel.git diff --git a/citadel/chkpwd.c b/citadel/chkpwd.c deleted file mode 100644 index b96ac7392..000000000 --- a/citadel/chkpwd.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * $Id$ - * - * a setuid helper program for machines which use shadow passwords - * by Nathan Bryant, March 1999 - * - */ - -#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; -}