From 55fe875a44bd63de766d4fbdb91bcc26be146a21 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 5 Nov 2004 22:53:35 +0000 Subject: r3563: During a typical logon a modern workstation makes a lot of anonymous session setups on its way to open a pipe. This gets rid of many round-trips to the LDAP server during logon by setting up the server_info_guest once and not asking the LDAP server and nss every time. Make sure that the ldap connection is reopened in the child. (I did not look at the sql backends.) Volker (This used to be commit 3298f6105e6a88c9390cac02245c8f2eee1e5046) --- source3/lib/smbldap.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/lib/smbldap.c') diff --git a/source3/lib/smbldap.c b/source3/lib/smbldap.c index 624ce22d22..a1f42d92ee 100644 --- a/source3/lib/smbldap.c +++ b/source3/lib/smbldap.c @@ -907,6 +907,7 @@ static int smbldap_open(struct smbldap_state *ldap_state) ldap_state->last_ping = time(NULL); + ldap_state->pid = sys_getpid(); DEBUG(4,("The LDAP server is succesfully connected\n")); return LDAP_SUCCESS; @@ -965,6 +966,9 @@ static int another_ldap_try(struct smbldap_state *ldap_state, int *rc, got_alarm = False; old_handler = CatchSignal(SIGALRM, gotalarm_sig); alarm(endtime - now); + + if (ldap_state->pid != sys_getpid()) + smbldap_close(ldap_state); } while (1) { -- cgit