Skip to content
Snippets Groups Projects
Commit ded3638d authored by Dan Fandrich's avatar Dan Fandrich
Browse files

Fix NTLM winbind support to pass the torture tests

Calling sclose() both in the child and the parent fools the
socket leak detector into thinking it's been closed twice.
Calling close() in the child instead overcomes this problem. It's
not as portable as the sclose() macro, but this code is highly
POSIX-specific, anyway.
parent 9194e170
No related branches found
No related tags found
No related merge requests found
......@@ -166,8 +166,8 @@ static CURLcode ntlm_wb_init(struct connectdata *conn, const char *userp)
* child process
*/
sclose(sockfds[0]);
/* Don't use sclose in the child since it fools the socket leak detector */
close(sockfds[0]);
if(dup2(sockfds[1], STDIN_FILENO) == -1) {
error = ERRNO;
failf(conn->data, "Could not redirect child stdin. errno %d: %s",
......@@ -197,7 +197,7 @@ static CURLcode ntlm_wb_init(struct connectdata *conn, const char *userp)
NULL);
error = ERRNO;
sclose(sockfds[1]);
close(sockfds[1]);
failf(conn->data, "Could not execl(). errno %d: %s",
error, Curl_strerror(conn, error));
exit(1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment