summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd_cache.c
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2001-10-05 00:20:06 +0000
committerTim Potter <tpot@samba.org>2001-10-05 00:20:06 +0000
commit482a9ef278567a35d3bcad1c2048ee97d86bfb9c (patch)
treea4cf752314cb3605aaa9c204c873f8b221df03ff /source3/nsswitch/winbindd_cache.c
parent18190fc0513d6fa8824fa0b105aeb16dd428106b (diff)
downloadsamba-482a9ef278567a35d3bcad1c2048ee97d86bfb9c.tar.gz
samba-482a9ef278567a35d3bcad1c2048ee97d86bfb9c.tar.bz2
samba-482a9ef278567a35d3bcad1c2048ee97d86bfb9c.zip
This is the start of a bit of a rewrite of winbindd's connection handling.
I've wrapped up all the decisions about managing, making and closing connections into a connection manager in nsswitch/winbindd_cm.c. It's rather incomplete at the moment - only querying basic user info works at the moment (i.e finger -m DOMAIN/user) and everything else is broken. Jeremy, please take a look and I'll start moving across the rest of winbindd to this new system. (This used to be commit c369cf5af787ed9c642778d21f162716fbf0620e)
Diffstat (limited to 'source3/nsswitch/winbindd_cache.c')
-rw-r--r--source3/nsswitch/winbindd_cache.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/source3/nsswitch/winbindd_cache.c b/source3/nsswitch/winbindd_cache.c
index 3fa50abfba..9c0ad5015c 100644
--- a/source3/nsswitch/winbindd_cache.c
+++ b/source3/nsswitch/winbindd_cache.c
@@ -47,6 +47,35 @@ void winbindd_cache_init(void)
}
}
+/* find the sequence number for a domain */
+
+static uint32 domain_sequence_number(char *domain_name)
+{
+ return DOM_SEQUENCE_NONE;
+
+#if 0
+ struct winbindd_domain *domain;
+ SAM_UNK_CTR ctr;
+
+ domain = find_domain_from_name(domain_name);
+ if (!domain) return DOM_SEQUENCE_NONE;
+
+ if (!wb_samr_query_dom_info(&domain->sam_dom_handle, 2, &ctr)) {
+
+ /* If this fails, something bad has gone wrong */
+
+ DEBUG(2,("domain sequence query failed\n"));
+ return DOM_SEQUENCE_NONE;
+ }
+
+ DEBUG(4,("got domain sequence number for %s of %u\n",
+ domain_name, (unsigned)ctr.info.inf2.seq_num));
+
+ return ctr.info.inf2.seq_num;
+#endif
+
+}
+
/* get the domain sequence number, possibly re-fetching */
static uint32 cached_sequence_number(char *domain_name)
{