summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-03-31 20:54:18 +0200
committerStefan Metzmacher <metze@samba.org>2010-04-01 13:01:27 +0200
commita2411c5708b47c3c2d53c34c6dbed7e1c2eab717 (patch)
tree1dc7fe3dde83f35be5a52d5b6448ae1001447776 /source3
parent0f95d00f49ce58a09c95b60777f8d1a65626ec37 (diff)
downloadsamba-a2411c5708b47c3c2d53c34c6dbed7e1c2eab717.tar.gz
samba-a2411c5708b47c3c2d53c34c6dbed7e1c2eab717.tar.bz2
samba-a2411c5708b47c3c2d53c34c6dbed7e1c2eab717.zip
s3:winbindd: correctly invalidate the cached connection
There're maybe additional TCP connection for ncacn_ip_tcp. metze
Diffstat (limited to 'source3')
-rw-r--r--source3/winbindd/winbindd_cm.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c
index 1ddfdef89b..c2df244568 100644
--- a/source3/winbindd/winbindd_cm.c
+++ b/source3/winbindd/winbindd_cm.c
@@ -1594,14 +1594,19 @@ void close_conns_after_fork(void)
struct winbindd_domain *domain;
for (domain = domain_list(); domain; domain = domain->next) {
- if (domain->conn.cli == NULL)
- continue;
+ struct cli_state *cli = domain->conn.cli;
- if (domain->conn.cli->fd == -1)
- continue;
+ /*
+ * first close the low level SMB TCP connection
+ * so that we don't generate any SMBclose
+ * requests in invalidate_cm_connection()
+ */
+ if (cli && cli->fd != -1) {
+ close(domain->conn.cli->fd);
+ domain->conn.cli->fd = -1;
+ }
- close(domain->conn.cli->fd);
- domain->conn.cli->fd = -1;
+ invalidate_cm_connection(&domain->conn);
}
}