r1128: The end-of-file is not the end of the world, so don't make a load DEBUG()...
[ira/wip.git] / source3 / utils / ntlm_auth.c
index 99767a56266217c2c95029512b46ba22b6362620..39dcd9993d070979b07b7dce2d984a2b1eb31ff2 100644 (file)
@@ -1594,9 +1594,13 @@ static void manage_squid_request(enum stdio_helper_mode helper_mode, stdio_helpe
 
        /* this is not a typo - x_fgets doesn't work too well under squid */
        if (fgets(buf, sizeof(buf)-1, stdin) == NULL) {
-               DEBUG(1, ("fgets() failed! dying..... errno=%d (%s)\n", ferror(stdin),
-                         strerror(ferror(stdin))));
-               exit(1);    /* BIIG buffer */
+               if (ferror(stdin)) {
+                       DEBUG(1, ("fgets() failed! dying..... errno=%d (%s)\n", ferror(stdin),
+                                 strerror(ferror(stdin))));
+                       
+                       exit(1);    /* BIIG buffer */
+               }
+               exit(0);
        }
     
        c=memchr(buf,'\n',sizeof(buf)-1);