mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
s3:winbindd: Remove obsolete sequence_number callback from ads backend
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
2d8093946d
commit
f3c603766b
@ -1324,54 +1324,6 @@ done:
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* find the sequence number for a domain */
|
|
||||||
static NTSTATUS sequence_number(struct winbindd_domain *domain, uint32_t *seq)
|
|
||||||
{
|
|
||||||
ADS_STRUCT *ads = NULL;
|
|
||||||
ADS_STATUS rc;
|
|
||||||
|
|
||||||
DEBUG(3,("ads: fetch sequence_number for %s\n", domain->name));
|
|
||||||
|
|
||||||
if ( !winbindd_can_contact_domain( domain ) ) {
|
|
||||||
DEBUG(10,("sequence: No incoming trust for domain %s\n",
|
|
||||||
domain->name));
|
|
||||||
*seq = time(NULL);
|
|
||||||
return NT_STATUS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IS_AD_DC) {
|
|
||||||
DEBUG(10,("sequence: Avoid LDAP connection for domain %s\n",
|
|
||||||
domain->name));
|
|
||||||
*seq = time(NULL);
|
|
||||||
return NT_STATUS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
*seq = DOM_SEQUENCE_NONE;
|
|
||||||
|
|
||||||
ads = ads_cached_connection(domain);
|
|
||||||
|
|
||||||
if (!ads) {
|
|
||||||
domain->last_status = NT_STATUS_SERVER_DISABLED;
|
|
||||||
return NT_STATUS_UNSUCCESSFUL;
|
|
||||||
}
|
|
||||||
|
|
||||||
rc = ads_USN(ads, seq);
|
|
||||||
|
|
||||||
if (!ADS_ERR_OK(rc)) {
|
|
||||||
|
|
||||||
/* its a dead connection, destroy it */
|
|
||||||
|
|
||||||
if (domain->private_data) {
|
|
||||||
ads = (ADS_STRUCT *)domain->private_data;
|
|
||||||
ads->is_mine = True;
|
|
||||||
ads_destroy(&ads);
|
|
||||||
ads_kdestroy(WINBIND_CCACHE_NAME);
|
|
||||||
domain->private_data = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ads_ntstatus(rc);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* find the lockout policy of a domain - use rpc methods */
|
/* find the lockout policy of a domain - use rpc methods */
|
||||||
static NTSTATUS lockout_policy(struct winbindd_domain *domain,
|
static NTSTATUS lockout_policy(struct winbindd_domain *domain,
|
||||||
TALLOC_CTX *mem_ctx,
|
TALLOC_CTX *mem_ctx,
|
||||||
@ -1574,7 +1526,7 @@ struct winbindd_methods ads_methods = {
|
|||||||
lookup_usergroups,
|
lookup_usergroups,
|
||||||
lookup_useraliases,
|
lookup_useraliases,
|
||||||
lookup_groupmem,
|
lookup_groupmem,
|
||||||
sequence_number,
|
NULL,
|
||||||
lockout_policy,
|
lockout_policy,
|
||||||
password_policy,
|
password_policy,
|
||||||
trusted_domains,
|
trusted_domains,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user