summaryrefslogtreecommitdiff
path: root/source3/passdb/pdb_ldap.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/pdb_ldap.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/pdb_ldap.c')
-rw-r--r--source3/passdb/pdb_ldap.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index dd46f8f87f..feda002d13 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -4993,7 +4993,8 @@ static bool ldapsam_new_rid(struct pdb_methods *methods, uint32_t *rid)
static bool ldapsam_sid_to_id(struct pdb_methods *methods,
const struct dom_sid *sid,
- union unid_t *id, enum lsa_SidType *type)
+ uid_t *uid, gid_t *gid,
+ enum lsa_SidType *type)
{
struct ldapsam_privates *priv =
(struct ldapsam_privates *)methods->private_data;
@@ -5055,10 +5056,10 @@ static bool ldapsam_sid_to_id(struct pdb_methods *methods,
goto done;
}
- id->gid = strtoul(gid_str, NULL, 10);
+ *gid = strtoul(gid_str, NULL, 10);
*type = (enum lsa_SidType)strtoul(value, NULL, 10);
- store_gid_sid_cache(sid, id->gid);
- idmap_cache_set_sid2gid(sid, id->gid);
+ store_gid_sid_cache(sid, *gid);
+ idmap_cache_set_sid2gid(sid, *gid);
ret = True;
goto done;
}
@@ -5073,10 +5074,10 @@ static bool ldapsam_sid_to_id(struct pdb_methods *methods,
goto done;
}
- id->uid = strtoul(value, NULL, 10);
+ *uid = strtoul(value, NULL, 10);
*type = SID_NAME_USER;
- store_uid_sid_cache(sid, id->uid);
- idmap_cache_set_sid2uid(sid, id->uid);
+ store_uid_sid_cache(sid, *uid);
+ idmap_cache_set_sid2uid(sid, *uid);
ret = True;
done: