diff options
author | Stefan Metzmacher <metze@samba.org> | 2014-11-29 10:52:05 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2014-12-18 10:46:13 +0100 |
commit | ddc2bba9e1f0339dceae60189717ae1c6716b7a7 (patch) | |
tree | f2d71a3732a09705d329ccb7af19a5290c65da7f | |
parent | dac59a2b62bda35c075c61a943fc03dfc0f3c93c (diff) | |
download | samba-ddc2bba9e1f0339dceae60189717ae1c6716b7a7.tar.gz |
s3:idmap_cache: remove unused idmap_cache_set_sid2[u|g]id()
Change-Id: I40bcfacb812b0dac7917533c9baf82a79f598efd
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Autobuild-User(master): Garming Sam <garming@samba.org>
Autobuild-Date(master): Wed Dec 3 06:44:29 CET 2014 on sn-devel-104
(cherry picked from commit 816751a3a8ed564f2cf880fd1ca3b1e8f9c85471)
-rw-r--r-- | source3/lib/idmap_cache.c | 72 | ||||
-rw-r--r-- | source3/lib/idmap_cache.h | 2 |
2 files changed, 0 insertions, 74 deletions
diff --git a/source3/lib/idmap_cache.c b/source3/lib/idmap_cache.c index 884417193f8..11bda393d0e 100644 --- a/source3/lib/idmap_cache.c +++ b/source3/lib/idmap_cache.c @@ -346,78 +346,6 @@ void idmap_cache_set_sid2unixid(const struct dom_sid *sid, struct unixid *unix_i } } -/** - * Store a mapping in the idmap cache - * @param[in] sid the sid to map - * @param[in] uid the uid to map - * - * If both parameters are valid values, then a positive mapping in both - * directions is stored. If "is_null_sid(sid)" is true, then this will be a - * negative mapping of uid, we want to cache that for this uid we could not - * find anything. Likewise if "uid==-1", then we want to cache that we did not - * find a mapping for the sid passed here. - */ - -void idmap_cache_set_sid2uid(const struct dom_sid *sid, uid_t uid) -{ - struct unixid id; - id.type = ID_TYPE_UID; - id.id = uid; - - if (uid == -1) { - uid_t tmp_gid; - bool expired; - /* If we were asked to invalidate this SID -> UID - * mapping, it was because we found out that this was - * not a UID at all. Do not overwrite a valid GID or - * BOTH mapping */ - if (idmap_cache_find_sid2gid(sid, &tmp_gid, &expired)) { - if (!expired) { - return; - } - } - } - - idmap_cache_set_sid2unixid(sid, &id); - return; -} - -/** - * Store a mapping in the idmap cache - * @param[in] sid the sid to map - * @param[in] gid the gid to map - * - * If both parameters are valid values, then a positive mapping in both - * directions is stored. If "is_null_sid(sid)" is true, then this will be a - * negative mapping of gid, we want to cache that for this gid we could not - * find anything. Likewise if "gid==-1", then we want to cache that we did not - * find a mapping for the sid passed here. - */ - -void idmap_cache_set_sid2gid(const struct dom_sid *sid, gid_t gid) -{ - struct unixid id; - id.type = ID_TYPE_GID; - id.id = gid; - - if (gid == -1) { - uid_t tmp_uid; - bool expired; - /* If we were asked to invalidate this SID -> GID - * mapping, it was because we found out that this was - * not a GID at all. Do not overwrite a valid UID or - * BOTH mapping */ - if (idmap_cache_find_sid2uid(sid, &tmp_uid, &expired)) { - if (!expired) { - return; - } - } - } - - idmap_cache_set_sid2unixid(sid, &id); - return; -} - static char* key_xid2sid_str(TALLOC_CTX* mem_ctx, char t, const char* id) { return talloc_asprintf(mem_ctx, "IDMAP/%cID2SID/%s", t, id); } diff --git a/source3/lib/idmap_cache.h b/source3/lib/idmap_cache.h index 088526635e6..5b8586f7022 100644 --- a/source3/lib/idmap_cache.h +++ b/source3/lib/idmap_cache.h @@ -32,8 +32,6 @@ bool idmap_cache_find_sid2gid(const struct dom_sid *sid, gid_t *pgid, bool idmap_cache_find_uid2sid(uid_t uid, struct dom_sid *sid, bool *expired); bool idmap_cache_find_gid2sid(gid_t gid, struct dom_sid *sid, bool *expired); void idmap_cache_set_sid2unixid(const struct dom_sid *sid, struct unixid *unix_id); -void idmap_cache_set_sid2uid(const struct dom_sid *sid, uid_t uid); -void idmap_cache_set_sid2gid(const struct dom_sid *sid, gid_t gid); bool idmap_cache_del_uid(uid_t uid); bool idmap_cache_del_gid(gid_t gid); |