From 60086dcf9a58525d400b39e9464847d73cbce6d2 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 14 Aug 2010 13:28:40 +1000 Subject: 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 --- source4/ntvfs/unixuid/vfs_unixuid.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'source4/ntvfs/unixuid') 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;inum_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); -- cgit