From 36e360da4d68844897b0ed1f8c917065dba28512 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Wed, 20 Jun 2007 19:25:25 +0000 Subject: [PATCH] * check whether we shoud shut down. we do this by checking whether the password is an empty string. --- citadel/chkpwd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/citadel/chkpwd.c b/citadel/chkpwd.c index 076138cf8..a2235bdfd 100644 --- a/citadel/chkpwd.c +++ b/citadel/chkpwd.c @@ -26,9 +26,12 @@ int main(void) char buf[SIZ]; while (1) { + buf[0] = '\0'; read(0, &uid, sizeof(uid_t)); /* uid */ read(0, buf, 256); /* password */ + if (buf[0] == '\0') + return (0); if (validate_password(uid, buf)) { write(1, "PASS", 4); } -- 2.39.2