diff options
author | Michael Adam <obnox@samba.org> | 2009-11-14 01:06:35 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2009-11-14 01:28:50 +0100 |
commit | 30ab3a762e644f5825adf4aef82e00d20e7228fb (patch) | |
tree | 977f665a9f7603bae7be30ecc4f83a5e803b921f /source3 | |
parent | 3b7448de1468dd86d101972bce40e4931fa2d1c3 (diff) | |
download | samba-30ab3a762e644f5825adf4aef82e00d20e7228fb.tar.gz samba-30ab3a762e644f5825adf4aef82e00d20e7228fb.tar.bz2 samba-30ab3a762e644f5825adf4aef82e00d20e7228fb.zip |
s3:passdb: remove the uid_to_rid method - we only need uid_to_sid
Michael
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/passdb.h | 2 | ||||
-rw-r--r-- | source3/include/proto.h | 1 | ||||
-rw-r--r-- | source3/passdb/lookup_sid.c | 5 | ||||
-rw-r--r-- | source3/passdb/pdb_ads.c | 7 | ||||
-rw-r--r-- | source3/passdb/pdb_interface.c | 28 |
5 files changed, 1 insertions, 42 deletions
diff --git a/source3/include/passdb.h b/source3/include/passdb.h index 2b4f9c2e43..e42d34f3f6 100644 --- a/source3/include/passdb.h +++ b/source3/include/passdb.h @@ -385,8 +385,6 @@ struct pdb_methods struct pdb_search *search, const DOM_SID *sid); - bool (*uid_to_rid)(struct pdb_methods *methods, uid_t uid, - uint32 *rid); bool (*uid_to_sid)(struct pdb_methods *methods, uid_t uid, DOM_SID *sid); bool (*gid_to_sid)(struct pdb_methods *methods, gid_t gid, diff --git a/source3/include/proto.h b/source3/include/proto.h index f9a2a50ec2..aeb19d3c20 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -4624,7 +4624,6 @@ NTSTATUS pdb_lookup_names(const DOM_SID *domain_sid, bool pdb_get_account_policy(enum pdb_policy_type type, uint32_t *value); bool pdb_set_account_policy(enum pdb_policy_type type, uint32_t value); bool pdb_get_seq_num(time_t *seq_num); -bool pdb_uid_to_rid(uid_t uid, uint32 *rid); bool pdb_uid_to_sid(uid_t uid, DOM_SID *sid); bool pdb_gid_to_sid(gid_t gid, DOM_SID *sid); bool pdb_sid_to_id(const DOM_SID *sid, union unid_t *id, diff --git a/source3/passdb/lookup_sid.c b/source3/passdb/lookup_sid.c index 1fcd94c059..a197c51ac8 100644 --- a/source3/passdb/lookup_sid.c +++ b/source3/passdb/lookup_sid.c @@ -1129,19 +1129,16 @@ void store_gid_sid_cache(const DOM_SID *psid, gid_t gid) static void legacy_uid_to_sid(DOM_SID *psid, uid_t uid) { - uint32 rid; bool ret; ZERO_STRUCTP(psid); become_root(); - ret = pdb_uid_to_rid(uid, &rid); + ret = pdb_uid_to_sid(uid, psid); unbecome_root(); if (ret) { /* This is a mapped user */ - sid_copy(psid, get_global_sam_sid()); - sid_append_rid(psid, rid); goto done; } diff --git a/source3/passdb/pdb_ads.c b/source3/passdb/pdb_ads.c index 35aadbd99f..3ddf4f2dc0 100644 --- a/source3/passdb/pdb_ads.c +++ b/source3/passdb/pdb_ads.c @@ -1917,12 +1917,6 @@ static bool pdb_ads_search_aliases(struct pdb_methods *m, return true; } -static bool pdb_ads_uid_to_rid(struct pdb_methods *m, uid_t uid, - uint32 *rid) -{ - return false; -} - static bool pdb_ads_uid_to_sid(struct pdb_methods *m, uid_t uid, DOM_SID *sid) { @@ -2072,7 +2066,6 @@ static void pdb_ads_init_methods(struct pdb_methods *m) m->search_users = pdb_ads_search_users; m->search_groups = pdb_ads_search_groups; m->search_aliases = pdb_ads_search_aliases; - m->uid_to_rid = pdb_ads_uid_to_rid; m->uid_to_sid = pdb_ads_uid_to_sid; m->gid_to_sid = pdb_ads_gid_to_sid; m->sid_to_id = pdb_ads_sid_to_id; diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c index b5d55bc3eb..de46254dde 100644 --- a/source3/passdb/pdb_interface.c +++ b/source3/passdb/pdb_interface.c @@ -1024,12 +1024,6 @@ bool pdb_get_seq_num(time_t *seq_num) return NT_STATUS_IS_OK(pdb->get_seq_num(pdb, seq_num)); } -bool pdb_uid_to_rid(uid_t uid, uint32 *rid) -{ - struct pdb_methods *pdb = pdb_get_methods(); - return pdb->uid_to_rid(pdb, uid, rid); -} - bool pdb_uid_to_sid(uid_t uid, DOM_SID *sid) { struct pdb_methods *pdb = pdb_get_methods(); @@ -1229,27 +1223,6 @@ static bool pdb_default_uid_to_sid(struct pdb_methods *methods, uid_t uid, return True; } -static bool pdb_default_uid_to_rid(struct pdb_methods *methods, uid_t uid, - uint32 *rid) -{ - DOM_SID sid; - bool ret; - - ret = pdb_default_uid_to_sid(methods, uid, &sid); - if (!ret) { - return ret; - } - - ret = sid_peek_check_rid(get_global_sam_sid(), &sid, rid); - - if (!ret) { - DEBUG(1, ("Could not peek rid out of sid %s\n", - sid_string_dbg(&sid))); - } - - return ret; -} - static bool pdb_default_gid_to_sid(struct pdb_methods *methods, gid_t gid, DOM_SID *sid) { @@ -2057,7 +2030,6 @@ NTSTATUS make_pdb_method( struct pdb_methods **methods ) (*methods)->get_account_policy = pdb_default_get_account_policy; (*methods)->set_account_policy = pdb_default_set_account_policy; (*methods)->get_seq_num = pdb_default_get_seq_num; - (*methods)->uid_to_rid = pdb_default_uid_to_rid; (*methods)->uid_to_sid = pdb_default_uid_to_sid; (*methods)->gid_to_sid = pdb_default_gid_to_sid; (*methods)->sid_to_id = pdb_default_sid_to_id; |