summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-12-11 14:19:50 +0100
committerVolker Lendecke <vlendec@samba.org>2010-12-19 23:25:06 +0100
commite113b1c64f1dfd84911050379d06d9ffc4958db3 (patch)
treea47eaecee7ad3e74e99b69a11e129cd04ae57fd2 /source3
parentff5f767d0e31ea0c5311ce48d8e0387eebd84ce8 (diff)
downloadsamba-e113b1c64f1dfd84911050379d06d9ffc4958db3.tar.gz
samba-e113b1c64f1dfd84911050379d06d9ffc4958db3.tar.bz2
samba-e113b1c64f1dfd84911050379d06d9ffc4958db3.zip
s3: netsamlogon_clear_cached_user only needs the SID
Diffstat (limited to 'source3')
-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)