summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2010-07-06 15:33:50 +0200
committerAndreas Schneider <asn@samba.org>2010-07-06 18:38:13 +0200
commit9d23f8fbc5b80b0a2f34bbd1a1beef63cb06d3c1 (patch)
tree58b187af088a56f4ac82cdefa58eb29d0918ad9e /source3
parentc5cd35658be8c473893f4aa230b38de667f12154 (diff)
downloadsamba-9d23f8fbc5b80b0a2f34bbd1a1beef63cb06d3c1.tar.gz
samba-9d23f8fbc5b80b0a2f34bbd1a1beef63cb06d3c1.tar.bz2
samba-9d23f8fbc5b80b0a2f34bbd1a1beef63cb06d3c1.zip
s3-winbind: Make sure that the policy handles are closed.
Diffstat (limited to 'source3')
-rw-r--r--source3/winbindd/winbindd_cm.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c
index 19b73bceb7..fa1b78cb4f 100644
--- a/source3/winbindd/winbindd_cm.c
+++ b/source3/winbindd/winbindd_cm.c
@@ -1574,6 +1574,10 @@ void invalidate_cm_connection(struct winbindd_cm_conn *conn)
}
if (conn->samr_pipe != NULL) {
+ if (is_valid_policy_hnd(&conn->sam_connect_handle)) {
+ rpccli_samr_Close(conn->samr_pipe, talloc_tos(),
+ &conn->sam_connect_handle);
+ }
TALLOC_FREE(conn->samr_pipe);
/* Ok, it must be dead. Drop timeout to 0.5 sec. */
if (conn->cli) {
@@ -1582,6 +1586,10 @@ void invalidate_cm_connection(struct winbindd_cm_conn *conn)
}
if (conn->lsa_pipe != NULL) {
+ if (is_valid_policy_hnd(&conn->lsa_policy)) {
+ rpccli_lsa_Close(conn->lsa_pipe, talloc_tos(),
+ &conn->lsa_policy);
+ }
TALLOC_FREE(conn->lsa_pipe);
/* Ok, it must be dead. Drop timeout to 0.5 sec. */
if (conn->cli) {
@@ -1590,6 +1598,10 @@ void invalidate_cm_connection(struct winbindd_cm_conn *conn)
}
if (conn->lsa_pipe_tcp != NULL) {
+ if (is_valid_policy_hnd(&conn->lsa_policy)) {
+ rpccli_lsa_Close(conn->lsa_pipe, talloc_tos(),
+ &conn->lsa_policy);
+ }
TALLOC_FREE(conn->lsa_pipe_tcp);
/* Ok, it must be dead. Drop timeout to 0.5 sec. */
if (conn->cli) {