The Samba-Bugzilla – Attachment 2090 Details for
Bug 4009
Samba 3.0.23[ab] winbind leaves sockets in CLOSE_WAIT; leaks file-descriptors
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
do not rely on ads_do_search_retry to do the unbind after the ads_USN()
diff (text/plain), 1.79 KB, created by
Guenther Deschner
on 2006-08-10 14:59:04 UTC
(
hide
)
Description:
do not rely on ads_do_search_retry to do the unbind after the ads_USN()
Filename:
MIME Type:
Creator:
Guenther Deschner
Created:
2006-08-10 14:59:04 UTC
Size:
1.79 KB
patch
obsolete
>Index: nsswitch/winbindd_ads.c >=================================================================== >--- nsswitch/winbindd_ads.c (revision 17457) >+++ nsswitch/winbindd_ads.c (working copy) >@@ -1029,11 +1029,7 @@ > rc = ads_USN(ads, seq); > > if (!ADS_ERR_OK(rc)) { >- >- /* its a dead connection ; don't destroy it >- through since ads_USN() has already done >- that indirectly */ >- >+ ads_destroy(&ads); > domain->private_data = NULL; > } > return ads_ntstatus(rc); >Index: libads/ldap.c >=================================================================== >--- libads/ldap.c (revision 17457) >+++ libads/ldap.c (working copy) >@@ -134,6 +134,7 @@ > > if ( !ads_cldap_netlogon( srv, ads->server.realm, &cldap_reply ) ) { > DEBUG(3,("ads_try_connect: CLDAP request %s failed.\n", srv)); >+ SAFE_FREE( srv ); > return False; > } > >@@ -2178,15 +2179,20 @@ > ADS_STATUS status; > void *res; > >- status = ads_do_search_retry(ads, "", LDAP_SCOPE_BASE, "(objectclass=*)", attrs, &res); >+ status = ads_do_search(ads, "", LDAP_SCOPE_BASE, "(objectclass=*)", attrs, &res); > if (!ADS_ERR_OK(status)) > return status; > > if (ads_count_replies(ads, res) != 1) { >+ ads_msgfree(ads, res); > return ADS_ERROR(LDAP_NO_RESULTS_RETURNED); > } > >- ads_pull_uint32(ads, res, "highestCommittedUSN", usn); >+ if (!ads_pull_uint32(ads, res, "highestCommittedUSN", usn)) { >+ ads_msgfree(ads, res); >+ return ADS_ERROR(LDAP_NO_SUCH_ATTRIBUTE); >+ } >+ > ads_msgfree(ads, res); > return ADS_SUCCESS; > } >Index: libads/cldap.c >=================================================================== >--- libads/cldap.c (revision 17457) >+++ libads/cldap.c (working copy) >@@ -295,6 +295,7 @@ > > ret = send_cldap_netlogon(sock, realm, global_myname(), 6); > if (ret != 0) { >+ close(sock); > return False; > } > ret = recv_cldap_netlogon(sock, reply);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 4009
: 2090