1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-08 13:49:29 +03:00

s3: add functions to flush the idmap memcache

This commit is contained in:
Gregor Beck
2011-02-18 14:42:18 +01:00
committed by Michael Adam
parent d03631c43f
commit 01e7611050
2 changed files with 16 additions and 0 deletions

View File

@ -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 */

View File

@ -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);
}