summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/proto.h2
-rw-r--r--source3/libsmb/samlogon_cache.c10
-rw-r--r--source3/winbindd/winbindd_cache.c2
3 files changed, 4 insertions, 10 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 9583388362..11060aa6d3 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -2835,7 +2835,7 @@ NTSTATUS remote_password_change(const char *remote_machine, const char *user_nam
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);
diff --git a/source3/libsmb/samlogon_cache.c b/source3/libsmb/samlogon_cache.c
index 52fbe04351..f3ef9547b7 100644
--- a/source3/libsmb/samlogon_cache.c
+++ b/source3/libsmb/samlogon_cache.c
@@ -99,25 +99,19 @@ bool netsamlogon_cache_shutdown(void)
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));
diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c
index 44c6f2b80b..7663063aeb 100644
--- a/source3/winbindd/winbindd_cache.c
+++ b/source3/winbindd/winbindd_cache.c
@@ -3034,7 +3034,7 @@ void wcache_invalidate_samlogon(struct winbindd_domain *domain,
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)