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/passdb/pdb_ldap.c | |
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/passdb/pdb_ldap.c')
-rw-r--r-- | source3/passdb/pdb_ldap.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index d9e272ed6d..89e05c0169 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -51,6 +51,7 @@ #include "../libcli/security/security.h" #include "../lib/util/util_pw.h" #include "lib/winbind_util.h" +#include "librpc/gen_ndr/idmap.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_PASSDB @@ -4970,8 +4971,7 @@ 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, - uid_t *uid, gid_t *gid, - enum lsa_SidType *type) + struct unixid *id) { struct ldapsam_privates *priv = (struct ldapsam_privates *)methods->private_data; @@ -5033,9 +5033,9 @@ static bool ldapsam_sid_to_id(struct pdb_methods *methods, goto done; } - *gid = strtoul(gid_str, NULL, 10); - *type = (enum lsa_SidType)strtoul(value, NULL, 10); - idmap_cache_set_sid2gid(sid, *gid); + id->id = strtoul(gid_str, NULL, 10); + id->type = ID_TYPE_GID; + idmap_cache_set_sid2gid(sid, id->id); ret = True; goto done; } @@ -5050,9 +5050,9 @@ static bool ldapsam_sid_to_id(struct pdb_methods *methods, goto done; } - *uid = strtoul(value, NULL, 10); - *type = SID_NAME_USER; - idmap_cache_set_sid2uid(sid, *uid); + id->id = strtoul(value, NULL, 10); + id->type = ID_TYPE_UID; + idmap_cache_set_sid2uid(sid, id->id); ret = True; done: |