diff options
author | Jeremy Allison <jra@samba.org> | 2001-11-22 07:32:48 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-11-22 07:32:48 +0000 |
commit | a81e3902bce0ee6509290fdc009743c563443446 (patch) | |
tree | caeeb8c69a57572a9646f849846b98735d9c6cf6 /source3/nsswitch | |
parent | ee58402ac4cb4acc52bfe8f2c4dfb39f910cf27c (diff) | |
download | samba-a81e3902bce0ee6509290fdc009743c563443446.tar.gz samba-a81e3902bce0ee6509290fdc009743c563443446.tar.bz2 samba-a81e3902bce0ee6509290fdc009743c563443446.zip |
Fixed caching of lookupname/lookupsid. Error in check of success !
Jeremy.
(This used to be commit d039d4fa507a7284e7e1cada0026c63863fe0a2d)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r-- | source3/nsswitch/winbindd_util.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c index cf7a04e8ff..a40efe7437 100644 --- a/source3/nsswitch/winbindd_util.c +++ b/source3/nsswitch/winbindd_util.c @@ -293,12 +293,15 @@ static BOOL winbindd_lookup_sid_by_name_in_cache(fstring name, DOM_SID *sid, enu if ((domain = find_domain_from_name(domain_str)) == NULL) return False; - if (winbindd_fetch_sid_cache_entry(domain, name, &sid_ret)) + if (!winbindd_fetch_sid_cache_entry(domain, name, &sid_ret)) return False; string_to_sid( sid, sid_ret.sid); *type = (enum SID_NAME_USE)sid_ret.type; + DEBUG(10,("winbindd_lookup_sid_by_name_in_cache: Cache hit for name %s. SID = %s\n", + name, sid_ret.sid )); + return True; } @@ -409,12 +412,15 @@ static BOOL winbindd_lookup_name_by_sid_in_cache(DOM_SID *sid, fstring name, enu sid_to_string(sid_str, sid); - if (winbindd_fetch_name_cache_entry(domain, sid_str, &name_ret)) + if (!winbindd_fetch_name_cache_entry(domain, sid_str, &name_ret)) return False; fstrcpy( name, name_ret.name ); *type = (enum SID_NAME_USE)name_ret.type; + DEBUG(10,("winbindd_lookup_name_by_sid_in_cache: Cache hit for SID = %s, name %s\n", + sid_str, name )); + return True; } |