* Silenced a few warn_unused_result warnings (ongoing process)
[citadel.git] / citadel / user_ops.c
index 1b2eddd5f5a8c6162968135df19b2571530ab8d1..a4bb7eab40f4bb1ada0ac703ea029800298e46f0 100644 (file)
@@ -695,6 +695,7 @@ void do_login(void)
        create_room(MAILROOM, 4, "", 0, 1, 0, VIEW_MAILBOX);
        create_room(SENTITEMS, 4, "", 0, 1, 0, VIEW_MAILBOX);
        create_room(USERTRASHROOM, 4, "", 0, 1, 0, VIEW_MAILBOX);
+       /* create_room(USERDRAFTROOM, 4, "", 0, 1, 0, VIEW_MAILBOX); temporarily disabled for 7.60 */
 
        /* Run any startup routines registered by loadable modules */
        PerformSessionHooks(EVT_LOGIN);
@@ -771,6 +772,7 @@ void logout(void)
 static int validpw(uid_t uid, const char *pass)
 {
        char buf[256];
+       int rv = 0;
 
        if (IsEmptyStr(pass)) {
                CtdlLogPrintf(CTDL_DEBUG, "refusing to check empty password for uid=%d using chkpwd...\n", uid);
@@ -780,9 +782,9 @@ static int validpw(uid_t uid, const char *pass)
        CtdlLogPrintf(CTDL_DEBUG, "Validating password for uid=%d using chkpwd...\n", uid);
 
        begin_critical_section(S_CHKPWD);
-       write(chkpwd_write_pipe[1], &uid, sizeof(uid_t));
-       write(chkpwd_write_pipe[1], pass, 256);
-       read(chkpwd_read_pipe[0], buf, 4);
+       rv = write(chkpwd_write_pipe[1], &uid, sizeof(uid_t));
+       rv = write(chkpwd_write_pipe[1], pass, 256);
+       rv = read(chkpwd_read_pipe[0], buf, 4);
        end_critical_section(S_CHKPWD);
 
        if (!strncmp(buf, "PASS", 4)) {
@@ -935,6 +937,7 @@ void cmd_pass(char *buf)
        char password[256];
        int a;
 
+       memset(password, 0, sizeof(password));
        extract_token(password, buf, 0, '|', sizeof password);
        a = CtdlTryPassword(password);