]> code.citadel.org Git - citadel.git/commitdiff
* check whether we shoud shut down. we do this by checking whether the password is...
authorWilfried Göesgens <willi@citadel.org>
Wed, 20 Jun 2007 19:25:25 +0000 (19:25 +0000)
committerWilfried Göesgens <willi@citadel.org>
Wed, 20 Jun 2007 19:25:25 +0000 (19:25 +0000)
citadel/chkpwd.c

index 076138cf8b0b8326e8106dd253f8ace896d38728..a2235bdfd214978ad42dd45c3de95fdf78a07654 100644 (file)
@@ -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);
                }