--- ./fs/nfs/dir.c.orig 2005-02-05 13:02:40.000000000 +0100 +++ ./fs/nfs/dir.c 2005-02-06 22:07:26.000000000 +0100 @@ -1563,6 +1563,8 @@ cache.cred = cred; cache.jiffies = jiffies; status = NFS_PROTO(inode)->access(inode, &cache); + dfprintk(VFS, "NFS: access()=%d for ino %lu, cred %p, mask 0x%x->0x%x\n", + status, inode->i_ino, cred, mask, cache.mask); if (status != 0) return status; nfs_access_add_cache(inode, &cache); --- ./fs/nfs/inode.c.orig 2005-02-05 13:02:40.000000000 +0100 +++ ./fs/nfs/inode.c 2005-02-06 23:27:15.000000000 +0100 @@ -752,10 +752,9 @@ nfs_wb_all(inode); } fsg.ngroups = 0; - if (attr->ia_valid & ATTR_GID) { - fsg.ngroups = 1; - fsg.groups[0] = attr->ia_gid; - } + fsg.groups[fsg.ngroups++] = inode->i_gid; /* ATTR_SIZE */ + if (attr->ia_valid & ATTR_GID) + fsg.groups[fsg.ngroups++] = attr->ia_gid; error = NFS_PROTO(inode)->setattr(dentry, &fattr, attr, &fsg); if (error == 0) { nfs_refresh_inode(inode, &fattr); --- ./net/sunrpc/auth.c.orig 2005-02-05 13:02:40.000000000 +0100 +++ ./net/sunrpc/auth.c 2005-02-06 15:19:29.000000000 +0100 @@ -258,13 +258,14 @@ struct auth_cred acred; struct rpc_cred *ret; + dprintk("RPC: looking up %s cred\n", auth->au_ops->au_name); + acred.uid = current->fsuid; if (auth->au_ops->cr_add_groups) auth->au_ops->cr_add_groups(&acred, rg); - - dprintk("RPC: looking up %s cred\n", - auth->au_ops->au_name); ret = rpcauth_lookup_credcache(auth, &acred, taskflags); + + dprintk("RPC: cred %p\n", ret); return ret; } --- ./net/sunrpc/auth_unix.c.orig 2005-02-05 13:02:40.000000000 +0100 +++ ./net/sunrpc/auth_unix.c 2005-02-06 22:23:25.000000000 +0100 @@ -30,6 +30,7 @@ #ifdef RPC_DEBUG # define RPCDBG_FACILITY RPCDBG_AUTH +# define RG(rg,i) ((i) < (rg).ngroups ? (int)(rg).groups[i] : -1) #endif static struct rpc_credops unix_credops; @@ -113,12 +114,18 @@ if (in_group_p(gid)) acred->rg.groups[n++] = gid; } + acred->rg.ngroups = n; + dprintk("RPC: unx_add_groups(): rg=%d:%d,%d,%d -> %d:%d,%d,%d\n", + rg->ngroups, RG(*rg, 0), RG(*rg, 1), RG(*rg, 2), + n, RG(acred->rg, 0), RG(acred->rg, 1), RG(acred->rg, 2)); } else { + dprintk("RPC: unx_add_groups(): ngroups=%d\n", + current->group_info->ngroups); for (i = 0; i < n; ++i) acred->rg.groups[i] = GROUP_AT(current->group_info, i); + acred->rg.ngroups = n; } put_group_info(current->group_info); - acred->rg.ngroups = n; } static void