diff options
author | Volker Lendecke <vl@samba.org> | 2019-02-26 15:23:17 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2019-02-28 13:53:40 +0000 |
commit | c906153cc7af21abe508ddd30c447642327d6a5d (patch) | |
tree | 203400f437324322f11395ef967af568c324bb84 /source3/lib | |
parent | 40de67f1fcc46b7a64a7364c91dcedb474826d51 (diff) | |
download | samba-c906153cc7af21abe508ddd30c447642327d6a5d.tar.gz |
lib: Remove some unused code
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Feb 28 13:53:41 UTC 2019 on sn-devel-144
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/idmap_cache.c | 50 | ||||
-rw-r--r-- | source3/lib/idmap_cache.h | 2 | ||||
-rw-r--r-- | source3/lib/winbind_util.c | 34 | ||||
-rw-r--r-- | source3/lib/winbind_util.h | 2 |
4 files changed, 0 insertions, 88 deletions
diff --git a/source3/lib/idmap_cache.c b/source3/lib/idmap_cache.c index 9d2149844ed..d5a60e73403 100644 --- a/source3/lib/idmap_cache.c +++ b/source3/lib/idmap_cache.c @@ -228,56 +228,6 @@ static void idmap_cache_xid2sid_parser(const struct gencache_timeout *timeout, } /** - * Find a uid2sid mapping - * @param[in] uid the uid to map - * @param[out] sid where to put the result - * @param[out] expired is the cache entry expired? - * @retval Was anything in the cache at all? - * - * If "is_null_sid(sid)", this was a negative mapping. - */ - -bool idmap_cache_find_uid2sid(uid_t uid, struct dom_sid *sid, bool *expired) -{ - fstring key; - struct idmap_cache_xid2sid_state state; - - fstr_sprintf(key, "IDMAP/UID2SID/%d", (int)uid); - - state.sid = sid; - state.expired = expired; - state.ret = false; - - gencache_parse(key, idmap_cache_xid2sid_parser, &state); - return state.ret; -} - -/** - * Find a gid2sid mapping - * @param[in] gid the gid to map - * @param[out] sid where to put the result - * @param[out] expired is the cache entry expired? - * @retval Was anything in the cache at all? - * - * If "is_null_sid(sid)", this was a negative mapping. - */ - -bool idmap_cache_find_gid2sid(gid_t gid, struct dom_sid *sid, bool *expired) -{ - fstring key; - struct idmap_cache_xid2sid_state state; - - fstr_sprintf(key, "IDMAP/GID2SID/%d", (int)gid); - - state.sid = sid; - state.expired = expired; - state.ret = false; - - gencache_parse(key, idmap_cache_xid2sid_parser, &state); - return state.ret; -} - -/** * Find a xid2sid mapping * @param[in] id the unix id to map * @param[out] sid where to put the result diff --git a/source3/lib/idmap_cache.h b/source3/lib/idmap_cache.h index d5afa170e1a..5a90902e720 100644 --- a/source3/lib/idmap_cache.h +++ b/source3/lib/idmap_cache.h @@ -29,8 +29,6 @@ bool idmap_cache_find_sid2uid(const struct dom_sid *sid, uid_t *puid, bool *expired); bool idmap_cache_find_sid2gid(const struct dom_sid *sid, gid_t *pgid, bool *expired); -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); bool idmap_cache_find_xid2sid( const struct unixid *id, struct dom_sid *sid, bool *expired); void idmap_cache_set_sid2unixid(const struct dom_sid *sid, struct unixid *unix_id); diff --git a/source3/lib/winbind_util.c b/source3/lib/winbind_util.c index 46c95ca3a28..fe35a6f78d1 100644 --- a/source3/lib/winbind_util.c +++ b/source3/lib/winbind_util.c @@ -150,23 +150,6 @@ bool winbind_sid_to_uid(uid_t *puid, const struct dom_sid *sid) return (result == WBC_ERR_SUCCESS); } -/* Call winbindd to convert uid to sid */ - -bool winbind_uid_to_sid(struct dom_sid *sid, uid_t uid) -{ - struct wbcDomainSid dom_sid; - wbcErr result; - - result = wbcUidToSid(uid, &dom_sid); - if (result == WBC_ERR_SUCCESS) { - memcpy(sid, &dom_sid, sizeof(struct dom_sid)); - } else { - sid_copy(sid, &global_sid_NULL); - } - - return (result == WBC_ERR_SUCCESS); -} - /* Call winbindd to convert SID to gid */ bool winbind_sid_to_gid(gid_t *pgid, const struct dom_sid *sid) @@ -181,23 +164,6 @@ bool winbind_sid_to_gid(gid_t *pgid, const struct dom_sid *sid) return (result == WBC_ERR_SUCCESS); } -/* Call winbindd to convert gid to sid */ - -bool winbind_gid_to_sid(struct dom_sid *sid, gid_t gid) -{ - struct wbcDomainSid dom_sid; - wbcErr result; - - result = wbcGidToSid(gid, &dom_sid); - if (result == WBC_ERR_SUCCESS) { - memcpy(sid, &dom_sid, sizeof(struct dom_sid)); - } else { - sid_copy(sid, &global_sid_NULL); - } - - return (result == WBC_ERR_SUCCESS); -} - bool winbind_xid_to_sid(struct dom_sid *sid, const struct unixid *xid) { struct wbcUnixId wbc_xid; diff --git a/source3/lib/winbind_util.h b/source3/lib/winbind_util.h index 5ecda5a7b09..6056190d7a4 100644 --- a/source3/lib/winbind_util.h +++ b/source3/lib/winbind_util.h @@ -36,9 +36,7 @@ bool winbind_lookup_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid, enum lsa_SidType *name_type); bool winbind_ping(void); bool winbind_sid_to_uid(uid_t *puid, const struct dom_sid *sid); -bool winbind_uid_to_sid(struct dom_sid *sid, uid_t uid); bool winbind_sid_to_gid(gid_t *pgid, const struct dom_sid *sid); -bool winbind_gid_to_sid(struct dom_sid *sid, gid_t gid); bool winbind_xid_to_sid(struct dom_sid *sid, const struct unixid *xid); struct passwd * winbind_getpwnam(const char * sname); struct passwd * winbind_getpwsid(const struct dom_sid *sid); |