]> code.citadel.org Git - citadel.git/blobdiff - citadel/chkpwd.c
* check whether we shoud shut down. we do this by checking whether the password is...
[citadel.git] / 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);
                }