From 605d7d965a33d6a4be632dde9b15abb42801fdaf Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Tue, 18 Oct 2011 10:44:52 -0400 Subject: 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 Autobuild-Date: Tue Oct 18 20:57:16 CEST 2011 on sn-devel-104 --- source3/passdb/pdb_ads.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'source3/passdb/pdb_ads.c') diff --git a/source3/passdb/pdb_ads.c b/source3/passdb/pdb_ads.c index 57425349f8..8dc9585b40 100644 --- a/source3/passdb/pdb_ads.c +++ b/source3/passdb/pdb_ads.c @@ -2204,7 +2204,7 @@ static bool pdb_ads_gid_to_sid(struct pdb_methods *m, gid_t gid, } static bool pdb_ads_sid_to_id(struct pdb_methods *m, const struct dom_sid *sid, - union unid_t *id, enum lsa_SidType *type) + uid_t *uid, gid_t *gid, enum lsa_SidType *type) { struct pdb_ads_state *state = talloc_get_type_abort( m->private_data, struct pdb_ads_state); @@ -2216,6 +2216,9 @@ static bool pdb_ads_sid_to_id(struct pdb_methods *m, const struct dom_sid *sid, int rc; bool ret = false; + *uid = -1; + *gid = -1; + sidstr = sid_binstring_hex(sid); if (sidstr == NULL) { return false; @@ -2244,21 +2247,17 @@ static bool pdb_ads_sid_to_id(struct pdb_methods *m, const struct dom_sid *sid, goto fail; } if (atype == ATYPE_ACCOUNT) { - uint32_t uid; *type = SID_NAME_USER; - if (!tldap_pull_uint32(msg[0], "uidNumber", &uid)) { + if (!tldap_pull_uint32(msg[0], "uidNumber", uid)) { DEBUG(10, ("Did not find uidNumber\n")); goto fail; } - id->uid = uid; } else { - uint32_t gid; *type = SID_NAME_DOM_GRP; - if (!tldap_pull_uint32(msg[0], "gidNumber", &gid)) { + if (!tldap_pull_uint32(msg[0], "gidNumber", gid)) { DEBUG(10, ("Did not find gidNumber\n")); goto fail; } - id->gid = gid; } ret = true; fail: -- cgit