diff options
Diffstat (limited to 'source3/winbindd')
-rw-r--r-- | source3/winbindd/winbindd.c | 7 | ||||
-rw-r--r-- | source3/winbindd/winbindd_cm.c | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c index 0ecf11d0e5..e881ab412e 100644 --- a/source3/winbindd/winbindd.c +++ b/source3/winbindd/winbindd.c @@ -729,6 +729,7 @@ static void new_connection(int listen_sock, bool privileged) static void remove_client(struct winbindd_cli_state *state) { char c = 0; + int nwritten; /* It's a dead client - hold a funeral */ @@ -737,7 +738,11 @@ static void remove_client(struct winbindd_cli_state *state) } /* tell client, we are closing ... */ - write(state->sock, &c, sizeof(c)); + nwritten = write(state->sock, &c, sizeof(c)); + if (nwritten == -1) { + DEBUG(2, ("final write to client failed: %s\n", + strerror(errno))); + } /* Close socket */ diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c index 5f592fc6b7..3135b6a2a3 100644 --- a/source3/winbindd/winbindd_cm.c +++ b/source3/winbindd/winbindd_cm.c @@ -831,9 +831,10 @@ static NTSTATUS cm_prepare_connection(const struct winbindd_domain *domain, cli_setup_signing_state(*cli, Undefined); - if (!cli_negprot(*cli)) { - DEBUG(1, ("cli_negprot failed\n")); - result = NT_STATUS_UNSUCCESSFUL; + result = cli_negprot(*cli); + + if (!NT_STATUS_IS_OK(result)) { + DEBUG(1, ("cli_negprot failed: %s\n", nt_errstr(result))); goto done; } |