[dovecot-cvs] dovecot/src/auth passdb-checkpassword.c, 1.18.2.1,
1.18.2.2
tss-movial at dovecot.org
tss-movial at dovecot.org
Tue Jun 20 16:59:05 EEST 2006
Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv19978
Modified Files:
Tag: branch_1_0
passdb-checkpassword.c
Log Message:
If checkpassword lookup failed, we crashed. auth_debug logged checkpassword's exit_status wrong.
Index: passdb-checkpassword.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/passdb-checkpassword.c,v
retrieving revision 1.18.2.1
retrieving revision 1.18.2.2
diff -u -d -r1.18.2.1 -r1.18.2.2
--- passdb-checkpassword.c 20 Jun 2006 13:13:45 -0000 1.18.2.1
+++ passdb-checkpassword.c 20 Jun 2006 13:59:03 -0000 1.18.2.2
@@ -67,7 +67,8 @@
hash_remove(module->clients, POINTER_CAST(request->pid));
- if (strchr(str_c(request->input_buf), '\n') != NULL) {
+ if (request->input_buf != NULL &&
+ strchr(str_c(request->input_buf), '\n') != NULL) {
auth_request_log_error(request->request, "checkpassword",
"LF characters in checkpassword reply");
result = PASSDB_RESULT_INTERNAL_FAILURE;
@@ -160,12 +161,13 @@
i_error("checkpassword: Child %s died with signal %d",
dec2str(pid), WTERMSIG(status));
} else if (WIFEXITED(status)) {
+ request->exited = TRUE;
+ request->exit_status = WEXITSTATUS(status);
+
auth_request_log_debug(request->request,
"checkpassword", "exit_status=%d",
request->exit_status);
- request->exited = TRUE;
- request->exit_status = WEXITSTATUS(status);
checkpassword_request_half_finish(request);
request = NULL;
} else {
More information about the dovecot-cvs
mailing list