summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-08-14 13:28:40 +1000
committerAndrew Bartlett <abartlet@samba.org>2010-08-18 09:30:08 +1000
commit60086dcf9a58525d400b39e9464847d73cbce6d2 (patch)
tree587ca894af7c150b78ed66d2aaf3ffe13335e299 /source4
parente229f68b3e8f146d5dfa4ab57f126cc7ea5c7214 (diff)
downloadsamba-60086dcf9a58525d400b39e9464847d73cbce6d2.tar.gz
samba-60086dcf9a58525d400b39e9464847d73cbce6d2.tar.bz2
samba-60086dcf9a58525d400b39e9464847d73cbce6d2.zip
s4:ntvfs Don't treat the user SID and primary group SID special for idmap
This simply askes IDMAP about all the user SIDs, rather than the user and group sid, followed by all but the first two sids from the token. Andrew Bartlett
Diffstat (limited to 'source4')
-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);