diff options
-rw-r--r-- | source3/nsswitch/winbindd_cm.c | 11 | ||||
-rw-r--r-- | source3/smbd/oplock.c | 6 |
2 files changed, 16 insertions, 1 deletions
diff --git a/source3/nsswitch/winbindd_cm.c b/source3/nsswitch/winbindd_cm.c index 1aab918f69..ff2567d3e5 100644 --- a/source3/nsswitch/winbindd_cm.c +++ b/source3/nsswitch/winbindd_cm.c @@ -296,6 +296,9 @@ static NTSTATUS cm_prepare_connection(const struct winbindd_domain *domain, struct sockaddr_in *peeraddr_in = (struct sockaddr_in *)&peeraddr; + DEBUG(10,("cm_prepare_connection: connecting to DC %s for domain %s\n", + controller, domain->name )); + machine_password = secrets_fetch_machine_password(lp_workgroup(), NULL, NULL); @@ -921,6 +924,9 @@ static NTSTATUS cm_open_connection(struct winbindd_domain *domain, if ( saf_servername && NT_STATUS_IS_OK(check_negative_conn_cache( domain->name, saf_servername))) { + DEBUG(10,("cm_open_connection: saf_servername is '%s' for domain %s\n", + saf_servername, domain->name )); + /* convert an ip address to a name */ if ( is_ipaddress( saf_servername ) ) { fstring saf_name; @@ -949,7 +955,10 @@ static NTSTATUS cm_open_connection(struct winbindd_domain *domain, result = NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND; - if ((strlen(domain->dcname) > 0) + DEBUG(10,("cm_open_connection: dcname is '%s' for domain %s\n", + domain->dcname, domain->name )); + + if (*domain->dcname && NT_STATUS_IS_OK(check_negative_conn_cache( domain->name, domain->dcname)) && (resolve_name(domain->dcname, &domain->dcaddr.sin_addr, 0x20))) { diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c index eec19259d0..aaa236effa 100644 --- a/source3/smbd/oplock.c +++ b/source3/smbd/oplock.c @@ -348,6 +348,12 @@ static void oplock_timeout_handler(struct timed_event *te, { files_struct *fsp = (files_struct *)private_data; + /* Ensure we always remove this event. */ + if (fsp->oplock_timeout != NULL) { + /* Remove the timed event handler. */ + TALLOC_FREE(fsp->oplock_timeout); + fsp->oplock_timeout = NULL; + } DEBUG(0, ("Oplock break failed for file %s -- replying anyway\n", fsp->fsp_name)); global_client_failed_oplock_break = True; remove_oplock(fsp); |