summaryrefslogtreecommitdiff
path: root/source3/winbindd
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-12-19 21:47:45 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-12-19 21:47:45 +0100
commit5076c64d43c68a028ac944c336715b4cb277365f (patch)
treee88fc16979b75b5b30377e84b76ebb1b87e01591 /source3/winbindd
parent6998ef4fe021ebf40f63c2191d3259888a8ad7f4 (diff)
parent13eefa7c435cb5ac656f662c78260a82caf43180 (diff)
downloadsamba-5076c64d43c68a028ac944c336715b4cb277365f.tar.gz
samba-5076c64d43c68a028ac944c336715b4cb277365f.tar.bz2
samba-5076c64d43c68a028ac944c336715b4cb277365f.zip
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'source3/winbindd')
-rw-r--r--source3/winbindd/winbindd.c7
-rw-r--r--source3/winbindd/winbindd_cm.c7
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;
}