X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Futils%2Fchkpw.c;h=9691b734336376dd11a7eacf92422d371d70055a;hb=a520d904d0069654c57d2b69618bee1225ee3067;hp=b0f0d5885b5b22b140ebc58116029a0c3cd3cb79;hpb=d04e4ad0b8ab9e5b71310030704d61b6eceb530b;p=citadel.git diff --git a/citadel/utils/chkpw.c b/citadel/utils/chkpw.c index b0f0d5885..9691b7343 100644 --- a/citadel/utils/chkpw.c +++ b/citadel/utils/chkpw.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1987-2012 by the citadel.org team + * Copyright (c) 1987-2021 by the citadel.org team * * This program is open source software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3. @@ -114,9 +114,6 @@ int main(int argc, char **argv) { struct passwd *p; int uid; char ctdldir[PATH_MAX]=CTDLDIR; - char *ptr = NULL; - - calc_dirs_n_files(0,0,"", ctdldir, 0); printf("\n\n ** host auth mode test utility **\n\n"); start_chkpwd_daemon(); @@ -127,7 +124,7 @@ int main(int argc, char **argv) { } while(1) { printf("\n\nUsername: "); - ptr = fgets(buf, sizeof buf, stdin); + fgets(buf, sizeof buf, stdin); buf[strlen(buf)-1] = 0; p = getpwnam(buf); if (p == NULL) { @@ -137,7 +134,7 @@ int main(int argc, char **argv) { uid = p->pw_uid; printf(" uid: %d\n", uid); printf("Password: "); - ptr = fgets(buf, sizeof buf, stdin); + fgets(buf, sizeof buf, stdin); buf[strlen(buf)-1] = 0; validpw(uid, buf); }