]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: Fixed dovecot/auth hanging when child ntlm_auth crashes while processing an...
authorAndriy Syrovenko <andriys@gmail.com>
Sun, 16 Apr 2017 22:14:02 +0000 (01:14 +0300)
committerGitLab <gitlab@git.dovecot.net>
Wed, 26 Apr 2017 16:07:14 +0000 (19:07 +0300)
src/auth/mech-winbind.c

index 4a6569610513790bc06779c6cdebd22a1c1e3f6c..c12fb5effd9365734137967b402a5353b6518a31 100644 (file)
@@ -187,12 +187,18 @@ do_auth_continue(struct auth_request *auth_request,
        request->continued = FALSE;
 
        while ((answer = i_stream_read_next_line(in_pipe)) == NULL) {
-               if (in_pipe->stream_errno != 0)
+               if (in_pipe->stream_errno != 0 || in_pipe->eof)
                        break;
        }
        if (answer == NULL) {
-               auth_request_log_error(auth_request, AUTH_SUBSYS_MECH,
-                                      "read(in_pipe) failed: %m");
+               if (in_pipe->stream_errno != 0) {
+                       auth_request_log_error(auth_request, AUTH_SUBSYS_MECH,
+                                              "read(in_pipe) failed: %m");
+               } else {
+                       auth_request_log_error(auth_request, AUTH_SUBSYS_MECH,
+                                              "read(in_pipe) failed: "
+                                              "unexpected end of file");
+               }
                return HR_RESTART;
        }