summaryrefslogtreecommitdiff
path: root/source3/lib/idmap_cache.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2013-09-04 08:57:59 +0200
committerJeremy Allison <jra@samba.org>2013-09-05 20:09:21 +0200
commitd3c689fc5c80431b7e72150f72465b3d255a6f02 (patch)
tree5345e29db38968ef5692e1c8d2435b2d6a3fe45a /source3/lib/idmap_cache.c
parent32037e0533f720ebbd3f49c5951c4ef30aac9985 (diff)
downloadsamba-d3c689fc5c80431b7e72150f72465b3d255a6f02.tar.gz
samba-d3c689fc5c80431b7e72150f72465b3d255a6f02.tar.bz2
samba-d3c689fc5c80431b7e72150f72465b3d255a6f02.zip
lib: Use "mem_ctx" arg in gencache_get
Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Sep 5 20:09:21 CEST 2013 on sn-devel-104
Diffstat (limited to 'source3/lib/idmap_cache.c')
-rw-r--r--source3/lib/idmap_cache.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source3/lib/idmap_cache.c b/source3/lib/idmap_cache.c
index 627ced30b3..ffd3c1955c 100644
--- a/source3/lib/idmap_cache.c
+++ b/source3/lib/idmap_cache.c
@@ -48,7 +48,7 @@ bool idmap_cache_find_sid2unixid(const struct dom_sid *sid, struct unixid *id,
if (key == NULL) {
return false;
}
- ret = gencache_get(key, NULL, &value, &timeout);
+ ret = gencache_get(key, talloc_tos(), &value, &timeout);
if (!ret) {
goto done;
}
@@ -128,7 +128,7 @@ bool idmap_cache_find_sid2unixid(const struct dom_sid *sid, struct unixid *id,
done:
TALLOC_FREE(key);
- SAFE_FREE(value);
+ TALLOC_FREE(value);
return ret;
}
@@ -209,7 +209,7 @@ bool idmap_cache_find_uid2sid(uid_t uid, struct dom_sid *sid, bool *expired)
if (key == NULL) {
return false;
}
- ret = gencache_get(key, NULL, &value, &timeout);
+ ret = gencache_get(key, talloc_tos(), &value, &timeout);
TALLOC_FREE(key);
if (!ret) {
return false;
@@ -218,7 +218,7 @@ bool idmap_cache_find_uid2sid(uid_t uid, struct dom_sid *sid, bool *expired)
if (value[0] != '-') {
ret = string_to_sid(sid, value);
}
- SAFE_FREE(value);
+ TALLOC_FREE(value);
if (ret) {
*expired = (timeout <= time(NULL));
}
@@ -246,7 +246,7 @@ bool idmap_cache_find_gid2sid(gid_t gid, struct dom_sid *sid, bool *expired)
if (key == NULL) {
return false;
}
- ret = gencache_get(key, NULL, &value, &timeout);
+ ret = gencache_get(key, talloc_tos(), &value, &timeout);
TALLOC_FREE(key);
if (!ret) {
return false;
@@ -255,7 +255,7 @@ bool idmap_cache_find_gid2sid(gid_t gid, struct dom_sid *sid, bool *expired)
if (value[0] != '-') {
ret = string_to_sid(sid, value);
}
- SAFE_FREE(value);
+ TALLOC_FREE(value);
if (ret) {
*expired = (timeout <= time(NULL));
}
@@ -431,7 +431,7 @@ static bool idmap_cache_del_xid(char t, int xid)
time_t timeout;
bool ret = true;
- if (!gencache_get(key, NULL, &sid_str, &timeout)) {
+ if (!gencache_get(key, mem_ctx, &sid_str, &timeout)) {
DEBUG(3, ("no entry: %s\n", key));
ret = false;
goto done;