summaryrefslogtreecommitdiff
path: root/source3/passdb/pdb_samba4.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_samba4.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_samba4.c')
-rw-r--r--source3/passdb/pdb_samba4.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/source3/passdb/pdb_samba4.c b/source3/passdb/pdb_samba4.c
index af252143cd..8da9b3cf5a 100644
--- a/source3/passdb/pdb_samba4.c
+++ b/source3/passdb/pdb_samba4.c
@@ -50,7 +50,7 @@ static NTSTATUS pdb_samba4_getsamupriv(struct pdb_samba4_state *state,
TALLOC_CTX *mem_ctx,
struct ldb_message **pmsg);
static bool pdb_samba4_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);
static bool pdb_samba4_pull_time(struct ldb_message *msg, const char *attr,
time_t *ptime)
@@ -852,7 +852,7 @@ static NTSTATUS pdb_samba4_getgrfilter(struct pdb_methods *m, GROUP_MAP *map,
struct dom_sid *sid;
const char *str;
int rc;
- union unid_t id;
+ uid_t uid;
TALLOC_CTX *tmp_ctx = talloc_stackframe();
NT_STATUS_HAVE_NO_MEMORY(tmp_ctx);
@@ -885,7 +885,7 @@ static NTSTATUS pdb_samba4_getgrfilter(struct pdb_methods *m, GROUP_MAP *map,
map->sid = *sid;
- if (!pdb_samba4_sid_to_id(m, sid, &id, &map->sid_name_use)) {
+ if (!pdb_samba4_sid_to_id(m, sid, &uid, &map->gid, &map->sid_name_use)) {
talloc_free(tmp_ctx);
return NT_STATUS_NO_SUCH_GROUP;
}
@@ -893,7 +893,6 @@ static NTSTATUS pdb_samba4_getgrfilter(struct pdb_methods *m, GROUP_MAP *map,
DEBUG(1, (__location__ "Got SID_NAME_USER when searching for a group with %s", expression));
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
- map->gid = id.gid;
str = ldb_msg_find_attr_as_string(msg, "samAccountName",
NULL);
@@ -2001,7 +2000,7 @@ static bool pdb_samba4_gid_to_sid(struct pdb_methods *m, gid_t gid,
}
static bool pdb_samba4_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_samba4_state *state = talloc_get_type_abort(
m->private_data, struct pdb_samba4_state);
@@ -2059,7 +2058,7 @@ static bool pdb_samba4_sid_to_id(struct pdb_methods *m, const struct dom_sid *si
return false;
}
if (id_map.xid.type == ID_TYPE_GID || id_map.xid.type == ID_TYPE_BOTH) {
- id->gid = id_map.xid.id;
+ *gid = id_map.xid.id;
return true;
}
return false;
@@ -2076,7 +2075,7 @@ static bool pdb_samba4_sid_to_id(struct pdb_methods *m, const struct dom_sid *si
return false;
}
if (id_map.xid.type == ID_TYPE_UID || id_map.xid.type == ID_TYPE_BOTH) {
- id->uid = id_map.xid.id;
+ *uid = id_map.xid.id;
return true;
}
return false;