summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorGregor Beck <gbeck@sernet.de>2011-10-06 13:49:02 +0200
committerMichael Adam <obnox@samba.org>2011-10-12 22:45:52 +0200
commit3ff8733792ad9723fdd83532f6d882c073803056 (patch)
tree713ff9d6a9bda9ada6e2737c89918403c70fceb4 /source3/lib
parentb8eec18e3908a886bfaa4f2f5b56e445e1ba6ebb (diff)
downloadsamba-3ff8733792ad9723fdd83532f6d882c073803056.tar.gz
samba-3ff8733792ad9723fdd83532f6d882c073803056.tar.bz2
samba-3ff8733792ad9723fdd83532f6d882c073803056.zip
s3: fix id_cache_kill to delete the the id-mappig from caches
The intendet and documented behavior of smbcontrol smbd idmap kill is to delete the mapping from caches and additionally kill the smbd if an affected id is in use. Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/id_cache.c4
-rw-r--r--source3/lib/id_cache.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/source3/lib/id_cache.c b/source3/lib/id_cache.c
index 71693c1464..e71934d6e3 100644
--- a/source3/lib/id_cache.c
+++ b/source3/lib/id_cache.c
@@ -138,7 +138,7 @@ static void flush_uid_cache(void)
memcache_flush(NULL, SID_UID_CACHE);
memcache_flush(NULL, UID_SID_CACHE);
}
-static void delete_from_cache(const struct id_cache_ref* id)
+void id_cache_delete_from_cache(const struct id_cache_ref* id)
{
switch(id->type) {
case UID:
@@ -195,7 +195,7 @@ static void id_cache_delete(struct messaging_context *msg_ctx,
return;
}
- delete_from_cache(&id);
+ id_cache_delete_from_cache(&id);
}
void id_cache_register_msgs(struct messaging_context *ctx)
diff --git a/source3/lib/id_cache.h b/source3/lib/id_cache.h
index 208ce60e96..00fd2853c9 100644
--- a/source3/lib/id_cache.h
+++ b/source3/lib/id_cache.h
@@ -29,4 +29,6 @@ struct id_cache_ref {
bool id_cache_ref_parse(const char* str, struct id_cache_ref* id);
+void id_cache_delete_from_cache(const struct id_cache_ref* id);
+
void id_cache_register_msgs(struct messaging_context *ctx);