summaryrefslogtreecommitdiff
path: root/source3/lib/smbldap.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/smbldap.c')
-rw-r--r--source3/lib/smbldap.c4
1 files changed, 4 insertions, 0 deletions
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) {