diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-03-16 09:16:23 +1100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2012-05-02 12:45:29 +0200 |
commit | a6e29f23f09ba5b6b6d362f7683ae8088bc0ba85 (patch) | |
tree | 1483d783c627d660b46e250b6ad6bb41f3522d0e /source3/winbindd | |
parent | 802655011509c4f355cb74f971bf1cc2cbc25ac5 (diff) | |
download | samba-a6e29f23f09ba5b6b6d362f7683ae8088bc0ba85.tar.gz samba-a6e29f23f09ba5b6b6d362f7683ae8088bc0ba85.tar.bz2 samba-a6e29f23f09ba5b6b6d362f7683ae8088bc0ba85.zip |
s3-passdb: Change pdb_sid_to_id() to return struct unixid
This will make it easier to consistantly pass a struct unixid all the way up and
down the idmap stack, and allow ID_TYPE_BOTH to be handled correctly.
Andrew Bartlett
Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/winbindd')
-rw-r--r-- | source3/winbindd/idmap_passdb.c | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/source3/winbindd/idmap_passdb.c b/source3/winbindd/idmap_passdb.c index 4c26c5c466..e547e9bf7c 100644 --- a/source3/winbindd/idmap_passdb.c +++ b/source3/winbindd/idmap_passdb.c @@ -76,31 +76,8 @@ static NTSTATUS idmap_pdb_sids_to_unixids(struct idmap_domain *dom, struct id_ma int i; for (i = 0; ids[i]; i++) { - enum lsa_SidType type; - uid_t uid; - gid_t gid; - - if (pdb_sid_to_id(ids[i]->sid, &uid, &gid, &type)) { - switch (type) { - case SID_NAME_USER: - ids[i]->xid.id = uid; - ids[i]->xid.type = ID_TYPE_UID; - ids[i]->status = ID_MAPPED; - break; - - case SID_NAME_DOM_GRP: - case SID_NAME_ALIAS: - case SID_NAME_WKN_GRP: - ids[i]->xid.id = gid; - ids[i]->xid.type = ID_TYPE_GID; - ids[i]->status = ID_MAPPED; - break; - - default: /* ?? */ - /* make sure it is marked as unmapped */ - ids[i]->status = ID_UNKNOWN; - break; - } + if (pdb_sid_to_id(ids[i]->sid, &ids[i]->xid)) { + ids[i]->status = ID_MAPPED; } else { /* Query Failed */ ids[i]->status = ID_UNMAPPED; |