summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-03-23 17:30:34 +1100
committerMichael Adam <obnox@samba.org>2012-05-02 12:45:30 +0200
commitac97f151ed18351bf648b00e358cfb127f261826 (patch)
tree1d2e645635dab5bedc60ea0df4fff3e50a5ecffb /source3/auth
parent2d5df933f421602276c3dfc04852911d91f631fc (diff)
downloadsamba-ac97f151ed18351bf648b00e358cfb127f261826.tar.gz
samba-ac97f151ed18351bf648b00e358cfb127f261826.tar.bz2
samba-ac97f151ed18351bf648b00e358cfb127f261826.zip
s3-passdb: Use struct unixid in sids_to_unix_ids
This avoids the union in the struct wbcUnixId and moves us to using only struct unixid internally. Andrew Bartlett Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/auth_util.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index 4f6ebfa4a4..07ed9c1077 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -32,6 +32,7 @@
#include "passdb.h"
#include "../librpc/gen_ndr/ndr_auth.h"
#include "../auth/auth_sam_reply.h"
+#include "../librpc/gen_ndr/idmap.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_AUTH
@@ -465,7 +466,7 @@ NTSTATUS create_local_token(TALLOC_CTX *mem_ctx,
size_t i;
struct dom_sid tmp_sid;
struct auth_session_info *session_info;
- struct wbcUnixId *ids;
+ struct unixid *ids;
fstring tmp;
/* Ensure we can't possible take a code path leading to a
@@ -593,7 +594,7 @@ NTSTATUS create_local_token(TALLOC_CTX *mem_ctx,
t = session_info->security_token;
- ids = talloc_array(talloc_tos(), struct wbcUnixId,
+ ids = talloc_array(talloc_tos(), struct unixid,
t->num_sids);
if (ids == NULL) {
return NT_STATUS_NO_MEMORY;
@@ -606,18 +607,18 @@ NTSTATUS create_local_token(TALLOC_CTX *mem_ctx,
for (i=0; i<t->num_sids; i++) {
- if (i == 0 && ids[i].type != WBC_ID_TYPE_BOTH) {
+ if (i == 0 && ids[i].type != ID_TYPE_BOTH) {
continue;
}
- if (ids[i].type != WBC_ID_TYPE_GID &&
- ids[i].type != WBC_ID_TYPE_BOTH) {
+ if (ids[i].type != ID_TYPE_GID &&
+ ids[i].type != ID_TYPE_BOTH) {
DEBUG(10, ("Could not convert SID %s to gid, "
"ignoring it\n",
sid_string_dbg(&t->sids[i])));
continue;
}
- if (!add_gid_to_array_unique(session_info, ids[i].id.gid,
+ if (!add_gid_to_array_unique(session_info, ids[i].id,
&session_info->unix_token->groups,
&session_info->unix_token->ngroups)) {
return NT_STATUS_NO_MEMORY;