summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd_idmap_tdb.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-02-26 12:21:01 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-02-26 12:21:01 +0000
commitcee64b535355ed14aa8c9a30f51432563391ea34 (patch)
tree9d884a16c80a9a6a35bcc2cdaec774dfdf9057e6 /source3/nsswitch/winbindd_idmap_tdb.c
parentf7bb6982980abf32b98fee8e2624bb5932554dfe (diff)
downloadsamba-cee64b535355ed14aa8c9a30f51432563391ea34.tar.gz
samba-cee64b535355ed14aa8c9a30f51432563391ea34.tar.bz2
samba-cee64b535355ed14aa8c9a30f51432563391ea34.zip
Kill RID-only and domain+RID madness from winbind.
Now we deal with SIDs in almost all of winbind (a couple of limited exceptions remain, but I'm looking into them - they use non-winbind structs ATM). This has particular benifits in returning out-of-domain SIDs for group membership (Need to look into this a bit more) as well as general code quality. This also removes much of the complexity from the idmap interface, which now only deals with mapping IDs, not with SID->domain translations. Breifly tested, but needs more. Fixes some valgrind-found bugs from my previous commit. Winbind cache chagned to using SID strings in some places, as I could not follow exactly how to save and restore multiple packed sids properly. Andrew Bartlett (This used to be commit 9247cf08c40f016a924d600ac906cfc6a7016777)
Diffstat (limited to 'source3/nsswitch/winbindd_idmap_tdb.c')
-rw-r--r--source3/nsswitch/winbindd_idmap_tdb.c78
1 files changed, 0 insertions, 78 deletions
diff --git a/source3/nsswitch/winbindd_idmap_tdb.c b/source3/nsswitch/winbindd_idmap_tdb.c
index f27c3c1b5f..911b3b41d2 100644
--- a/source3/nsswitch/winbindd_idmap_tdb.c
+++ b/source3/nsswitch/winbindd_idmap_tdb.c
@@ -342,78 +342,6 @@ static BOOL tdb_get_gid_from_sid(DOM_SID * sid, gid_t * gid)
return tdb_get_id_from_sid(sid, gid, True);
}
-/* Get a uid from a user rid */
-static BOOL tdb_get_uid_from_rid(const char *dom_name, uint32 rid,
- uid_t * uid)
-{
- struct winbindd_domain *domain;
- DOM_SID sid;
-
- if (!(domain = find_domain_from_name(dom_name))) {
- return False;
- }
-
- sid_copy(&sid, &domain->sid);
- sid_append_rid(&sid, rid);
-
- return tdb_get_id_from_sid(&sid, uid, False);
-}
-
-/* Get a gid from a group rid */
-static BOOL tdb_get_gid_from_rid(const char *dom_name, uint32 rid,
- gid_t * gid)
-{
- struct winbindd_domain *domain;
- DOM_SID sid;
-
- if (!(domain = find_domain_from_name(dom_name))) {
- return False;
- }
-
- sid_copy(&sid, &domain->sid);
- sid_append_rid(&sid, rid);
-
- return tdb_get_id_from_sid(&sid, gid, True);
-}
-
-/* Get a user rid from a uid */
-static BOOL tdb_get_rid_from_uid(uid_t uid, uint32 * user_rid,
- struct winbindd_domain **domain)
-{
- DOM_SID sid;
-
- if (!tdb_get_sid_from_id((int) uid, &sid, False)) {
- return False;
- }
-
- *domain = find_domain_from_sid(&sid);
- if (!*domain)
- return False;
-
- sid_split_rid(&sid, user_rid);
-
- return True;
-}
-
-/* Get a group rid from a gid */
-static BOOL tdb_get_rid_from_gid(gid_t gid, uint32 * group_rid,
- struct winbindd_domain **domain)
-{
- DOM_SID sid;
-
- if (!tdb_get_sid_from_id((int) gid, &sid, True)) {
- return False;
- }
-
- *domain = find_domain_from_sid(&sid);
- if (!*domain)
- return False;
-
- sid_split_rid(&sid, group_rid);
-
- return True;
-}
-
/* Close the tdb */
static BOOL tdb_idmap_close(void)
{
@@ -500,12 +428,6 @@ struct idmap_methods tdb_idmap_methods = {
tdb_get_uid_from_sid,
tdb_get_gid_from_sid,
- tdb_get_rid_from_uid,
- tdb_get_rid_from_gid,
-
- tdb_get_uid_from_rid,
- tdb_get_gid_from_rid,
-
tdb_idmap_close,
tdb_idmap_status