The Samba-Bugzilla – Attachment 7563 Details for
Bug 8943
Slow but responsive DC can lock up winbindd for > 10 minutes at a time (3.5 to master)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Only use ldap lib timeout, not alarm() as well. Assumes a ldap lib with proper timeout handling
0001-libads-Do-not-use-alarm-to-attempt-to-time-out-LDAP-.patch (text/plain), 1.59 KB, created by
Andrew Bartlett
on 2012-05-15 12:06:10 UTC
(
hide
)
Description:
Only use ldap lib timeout, not alarm() as well. Assumes a ldap lib with proper timeout handling
Filename:
MIME Type:
Creator:
Andrew Bartlett
Created:
2012-05-15 12:06:10 UTC
Size:
1.59 KB
patch
obsolete
>From 37e7cf118e33725c00c4fb6bc685bd348a032177 Mon Sep 17 00:00:00 2001 >From: Andrew Bartlett <abartlet@samba.org> >Date: Tue, 15 May 2012 16:34:31 +1000 >Subject: [PATCH] libads: Do not use alarm() to attempt to time out LDAP calls > >A properly implemented socket-using library will not terminate >the ldap search simply because the process got a signal. > >Just use the timeout parameter instead. > >Andrew Bartlett >--- > source3/libads/ldap.c | 20 -------------------- > 1 files changed, 0 insertions(+), 20 deletions(-) > >diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c >index 70dad2f..9849542 100644 >--- a/source3/libads/ldap.c >+++ b/source3/libads/ldap.c >@@ -143,37 +143,17 @@ static int ldap_search_with_timeout(LDAP *ld, > int result; > > /* Setup timeout for the ldap_search_ext_s call - local and remote. */ >- gotalarm = 0; > > if (to) { > timeout.tv_sec = to; > timeout.tv_usec = 0; > timeout_ptr = &timeout; >- >- /* Setup alarm timeout. */ >- CatchSignal(SIGALRM, gotalarm_sig); >- /* Make the alarm time one second beyond >- the timout we're setting for the >- remote search timeout, to allow that >- to fire in preference. */ >- alarm(to+1); >- /* End setup timeout. */ > } > >- > result = ldap_search_ext_s(ld, base, scope, filter, attrs, > attrsonly, sctrls, cctrls, timeout_ptr, > sizelimit, res); > >- if (to) { >- /* Teardown alarm timeout. */ >- CatchSignal(SIGALRM, SIG_IGN); >- alarm(0); >- } >- >- if (gotalarm != 0) >- return LDAP_TIMELIMIT_EXCEEDED; >- > /* > * A bug in OpenLDAP means ldap_search_ext_s can return > * LDAP_SUCCESS but with a NULL res pointer. Cope with >-- >1.7.7.6 >
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 8943
:
7561
|
7562
| 7563 |
7565
|
7566
|
7567
|
7568
|
7569
|
7570
|
7572
|
7573
|
7574