summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGregor Beck <gbeck@sernet.de>2011-02-18 14:42:18 +0100
committerMichael Adam <obnox@samba.org>2011-02-28 12:58:37 +0100
commit01e76110501785a65387c360fcfee85fbf3a4fde (patch)
treee7f85e1c2c1747a84b6f86203b8c378634dd0eb1 /source3
parentd03631c43f7763bfaef22f93514b493169dd39f6 (diff)
downloadsamba-01e76110501785a65387c360fcfee85fbf3a4fde.tar.gz
samba-01e76110501785a65387c360fcfee85fbf3a4fde.tar.bz2
samba-01e76110501785a65387c360fcfee85fbf3a4fde.zip
s3: add functions to flush the idmap memcache
Diffstat (limited to 'source3')
-rw-r--r--source3/include/proto.h2
-rw-r--r--source3/passdb/lookup_sid.c14
2 files changed, 16 insertions, 0 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index fdc2b7b7b5..6f4f0fc7bb 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -3631,6 +3631,8 @@ NTSTATUS get_primary_group_sid(TALLOC_CTX *mem_ctx,
const char *username,
struct passwd **_pwd,
struct dom_sid **_group_sid);
+void flush_uid_cache(void);
+void flush_gid_cache(void);
/* The following definitions come from passdb/machine_sid.c */
diff --git a/source3/passdb/lookup_sid.c b/source3/passdb/lookup_sid.c
index 0e1b8d6c82..f1462af686 100644
--- a/source3/passdb/lookup_sid.c
+++ b/source3/passdb/lookup_sid.c
@@ -1642,3 +1642,17 @@ done:
TALLOC_FREE(tmp_ctx);
return NT_STATUS_OK;
}
+
+void flush_gid_cache(void)
+{
+ DEBUG(3, ("Flush GID <-> SID memcache\n"));
+ memcache_flush(NULL, SID_GID_CACHE);
+ memcache_flush(NULL, GID_SID_CACHE);
+}
+
+void flush_uid_cache(void)
+{
+ DEBUG(3, ("Flush UID <-> SID memcache\n"));
+ memcache_flush(NULL, SID_UID_CACHE);
+ memcache_flush(NULL, UID_SID_CACHE);
+}