summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd_ads.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-12-05 07:52:44 +0000
committerAndrew Tridgell <tridge@samba.org>2001-12-05 07:52:44 +0000
commitaddea9645d48bc77f88ed3fa724cdd522e2f31ce (patch)
tree7c466475596b1a0936038e41c8e3b1739437d546 /source3/nsswitch/winbindd_ads.c
parent5329af6e11f9005d27395eb57c1185029d893ae8 (diff)
downloadsamba-addea9645d48bc77f88ed3fa724cdd522e2f31ce.tar.gz
samba-addea9645d48bc77f88ed3fa724cdd522e2f31ce.tar.bz2
samba-addea9645d48bc77f88ed3fa724cdd522e2f31ce.zip
moved the sequence number fetch into the backend, and fetch the
sequence number via ldap when using ads (This used to be commit 9a084f0bb91883224ad44e2b76417d10c15cce42)
Diffstat (limited to 'source3/nsswitch/winbindd_ads.c')
-rw-r--r--source3/nsswitch/winbindd_ads.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/source3/nsswitch/winbindd_ads.c b/source3/nsswitch/winbindd_ads.c
index c5aebad11b..145f2b68d1 100644
--- a/source3/nsswitch/winbindd_ads.c
+++ b/source3/nsswitch/winbindd_ads.c
@@ -562,6 +562,20 @@ done:
return status;
}
+/* find the sequence number for a domain */
+static uint32 sequence_number(struct winbindd_domain *domain)
+{
+ uint32 usn;
+ ADS_STRUCT *ads = NULL;
+
+ ads = ads_cached_connection(domain);
+ if (!ads) return DOM_SEQUENCE_NONE;
+
+ if (!ads_USN(ads, &usn)) return DOM_SEQUENCE_NONE;
+
+ return usn;
+}
+
/* the ADS backend methods are exposed via this structure */
struct winbindd_methods ads_methods = {
query_user_list,
@@ -570,7 +584,8 @@ struct winbindd_methods ads_methods = {
sid_to_name,
query_user,
lookup_usergroups,
- lookup_groupmem
+ lookup_groupmem,
+ sequence_number
};
#endif