return centry;
}
+static bool is_my_own_sam_domain(struct winbindd_domain *domain)
+{
+ if (strequal(domain->name, get_global_sam_name()) &&
+ sid_equal(&domain->sid, get_global_sam_sid())) {
+ return true;
+ }
+
+ return false;
+}
+
+static bool is_builtin_domain(struct winbindd_domain *domain)
+{
+ if (strequal(domain->name, "BUILTIN") &&
+ sid_equal(&domain->sid, &global_sid_Builtin)) {
+ return true;
+ }
+
+ return false;
+}
+
/*
fetch an entry from the cache, with a varargs key. auto-fetch the sequence
number and return status
char *kstr;
struct cache_entry *centry;
- if (!winbindd_use_cache()) {
+ if (!winbindd_use_cache() ||
+ is_my_own_sam_domain(domain) ||
+ is_builtin_domain(domain)) {
return NULL;
}
TDB_DATA key, data;
bool ret = false;
- if (!wcache_opnum_cacheable(opnum)) {
+ if (!wcache_opnum_cacheable(opnum) ||
+ is_my_own_sam_domain(domain) ||
+ is_builtin_domain(domain)) {
return false;
}
TDB_DATA key, data;
uint32_t dom_seqnum, last_check;
- if (!wcache_opnum_cacheable(opnum)) {
+ if (!wcache_opnum_cacheable(opnum) ||
+ is_my_own_sam_domain(domain) ||
+ is_builtin_domain(domain)) {
return;
}