summaryrefslogtreecommitdiff
path: root/source3/passdb/lookup_sid.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2011-10-18 10:44:52 -0400
committerSimo Sorce <idra@samba.org>2011-10-18 20:57:16 +0200
commit605d7d965a33d6a4be632dde9b15abb42801fdaf (patch)
tree01ae99dca9bf63e666e23bef155b40427f05a30e /source3/passdb/lookup_sid.c
parent94799db9b5d33ded34ad3e934da673a44d48094a (diff)
downloadsamba-605d7d965a33d6a4be632dde9b15abb42801fdaf.tar.gz
samba-605d7d965a33d6a4be632dde9b15abb42801fdaf.tar.bz2
samba-605d7d965a33d6a4be632dde9b15abb42801fdaf.zip
pdb-interface: Do not use unid_t here
This interface needs to be publicly available, unid_t here is not really useful and makes it harder to use it as unid_t is not a public union. Autobuild-User: Simo Sorce <idra@samba.org> Autobuild-Date: Tue Oct 18 20:57:16 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3/passdb/lookup_sid.c')
-rw-r--r--source3/passdb/lookup_sid.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/source3/passdb/lookup_sid.c b/source3/passdb/lookup_sid.c
index a02c941d8e..cfc78ad000 100644
--- a/source3/passdb/lookup_sid.c
+++ b/source3/passdb/lookup_sid.c
@@ -1193,11 +1193,12 @@ static bool legacy_sid_to_uid(const struct dom_sid *psid, uid_t *puid)
enum lsa_SidType type;
if (sid_check_is_in_our_domain(psid)) {
- union unid_t id;
+ uid_t uid;
+ gid_t gid;
bool ret;
become_root();
- ret = pdb_sid_to_id(psid, &id, &type);
+ ret = pdb_sid_to_id(psid, &uid, &gid, &type);
unbecome_root();
if (ret) {
@@ -1207,7 +1208,7 @@ static bool legacy_sid_to_uid(const struct dom_sid *psid, uid_t *puid)
sid_type_lookup(type)));
return false;
}
- *puid = id.uid;
+ *puid = uid;
goto done;
}
@@ -1234,7 +1235,6 @@ done:
static bool legacy_sid_to_gid(const struct dom_sid *psid, gid_t *pgid)
{
GROUP_MAP *map;
- union unid_t id;
enum lsa_SidType type;
map = talloc_zero(NULL, GROUP_MAP);
@@ -1260,10 +1260,12 @@ static bool legacy_sid_to_gid(const struct dom_sid *psid, gid_t *pgid)
}
if (sid_check_is_in_our_domain(psid)) {
+ uid_t uid;
+ gid_t gid;
bool ret;
become_root();
- ret = pdb_sid_to_id(psid, &id, &type);
+ ret = pdb_sid_to_id(psid, &uid, &gid, &type);
unbecome_root();
if (ret) {
@@ -1274,7 +1276,7 @@ static bool legacy_sid_to_gid(const struct dom_sid *psid, gid_t *pgid)
sid_type_lookup(type)));
return false;
}
- *pgid = id.gid;
+ *pgid = gid;
goto done;
}