diff options
author | Simo Sorce <idra@samba.org> | 2011-10-18 10:44:52 -0400 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2011-10-18 20:57:16 +0200 |
commit | 605d7d965a33d6a4be632dde9b15abb42801fdaf (patch) | |
tree | 01ae99dca9bf63e666e23bef155b40427f05a30e /source3/passdb/pdb_ads.c | |
parent | 94799db9b5d33ded34ad3e934da673a44d48094a (diff) | |
download | samba-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_ads.c')
-rw-r--r-- | source3/passdb/pdb_ads.c | 13 |
1 files changed, 6 insertions, 7 deletions
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: |