summaryrefslogtreecommitdiff
path: root/source4/ntvfs/unixuid
diff options
context:
space:
mode:
Diffstat (limited to 'source4/ntvfs/unixuid')
-rw-r--r--source4/ntvfs/unixuid/vfs_unixuid.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/source4/ntvfs/unixuid/vfs_unixuid.c b/source4/ntvfs/unixuid/vfs_unixuid.c
index c80c52cc7d..d36ae15745 100644
--- a/source4/ntvfs/unixuid/vfs_unixuid.c
+++ b/source4/ntvfs/unixuid/vfs_unixuid.c
@@ -184,22 +184,14 @@ static NTSTATUS nt_token_to_unix_security(struct ntvfs_module_context *ntvfs,
ids = talloc_array(req, struct id_map, token->num_sids);
NT_STATUS_HAVE_NO_MEMORY(ids);
- ZERO_STRUCT(ids[0].xid);
- ids[0].sid = token->user_sid;
- ids[0].status = ID_UNKNOWN;
-
- ZERO_STRUCT(ids[1].xid);
- ids[1].sid = token->group_sid;
- ids[1].status = ID_UNKNOWN;
-
(*sec)->ngroups = token->num_sids - 2;
(*sec)->groups = talloc_array(*sec, gid_t, (*sec)->ngroups);
NT_STATUS_HAVE_NO_MEMORY((*sec)->groups);
- for (i=0;i<(*sec)->ngroups;i++) {
- ZERO_STRUCT(ids[i+2].xid);
- ids[i+2].sid = token->sids[i+2];
- ids[i+2].status = ID_UNKNOWN;
+ for (i=0;i<token->num_sids;i++) {
+ ZERO_STRUCT(ids[i].xid);
+ ids[i].sid = token->sids[i];
+ ids[i].status = ID_UNKNOWN;
}
ctx = wbc_sids_to_xids_send(priv->wbc_ctx, ids, token->num_sids, ids);