summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/lookup_sid.c5
-rw-r--r--source3/passdb/pdb_ads.c7
-rw-r--r--source3/passdb/pdb_interface.c28
3 files changed, 1 insertions, 39 deletions
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;