[dovecot-cvs] dovecot/src/auth passdb-checkpassword.c,1.19,1.20
tss-movial at dovecot.org
tss-movial at dovecot.org
Tue Jun 20 16:59:08 EEST 2006
Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv28190
Modified Files:
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.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- passdb-checkpassword.c 20 Jun 2006 13:13:47 -0000 1.19
+++ passdb-checkpassword.c 20 Jun 2006 13:59:05 -0000 1.20
@@ -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