]> code.citadel.org Git - citadel.git/blobdiff - citadel/user_ops.c
Eliminated the unpacking of uid in the chkpwd
[citadel.git] / citadel / user_ops.c
index 417ef630cc3bb114553cc6571100a87899313a99..4ac224e521bdaf5c29cd8efbf8f1c4301c1dcaa9 100644 (file)
@@ -592,8 +592,7 @@ static int validpw(uid_t uid, const char *pass)
        lprintf(CTDL_DEBUG, "Validating password for uid=%d using chkpwd...\n", uid);
 
        begin_critical_section(S_CHKPWD);
-       snprintf(buf, sizeof buf, "%016d", uid);
-       write(chkpwd_write_pipe[1], buf, 16);
+       write(chkpwd_write_pipe[1], &uid, sizeof(uid_t));
        write(chkpwd_write_pipe[1], pass, 256);
        read(chkpwd_read_pipe[0], buf, 4);
        end_critical_section(S_CHKPWD);