bool netsamlogon_cache_init(void);
bool netsamlogon_cache_shutdown(void);
-void netsamlogon_clear_cached_user(struct netr_SamInfo3 *info3);
+void netsamlogon_clear_cached_user(const struct dom_sid *user_sid);
bool netsamlogon_cache_store(const char *username, struct netr_SamInfo3 *info3);
struct netr_SamInfo3 *netsamlogon_cache_get(TALLOC_CTX *mem_ctx, const struct dom_sid *user_sid);
bool netsamlogon_cache_have(const struct dom_sid *user_sid);
Clear cache getpwnam and getgroups entries from the winbindd cache
***********************************************************************/
-void netsamlogon_clear_cached_user(struct netr_SamInfo3 *info3)
+void netsamlogon_clear_cached_user(const struct dom_sid *user_sid)
{
- struct dom_sid user_sid;
fstring keystr;
- if (!info3) {
- return;
- }
-
if (!netsamlogon_cache_init()) {
DEBUG(0,("netsamlogon_clear_cached_user: cannot open "
"%s for write!\n",
NETSAMLOGON_TDB));
return;
}
- sid_compose(&user_sid, info3->base.domain_sid, info3->base.rid);
/* Prepare key as DOMAIN-SID/USER-RID string */
- sid_to_fstring(keystr, &user_sid);
+ sid_to_fstring(keystr, user_sid);
DEBUG(10,("netsamlogon_clear_cached_user: SID [%s]\n", keystr));
tdb_delete(cache->tdb, string_tdb_data(key_str));
/* Samba/winbindd never needs this. */
- netsamlogon_clear_cached_user(info3);
+ netsamlogon_clear_cached_user(&sid);
}
bool wcache_invalidate_cache(void)