summaryrefslogtreecommitdiffstats
path: root/xlators/nfs/server/src/nfs-fops.c
diff options
context:
space:
mode:
authorJeff Darcy <jdarcy@redhat.com>2014-04-28 14:18:50 +0000
committerJeff Darcy <jdarcy@redhat.com>2014-04-28 14:18:50 +0000
commite139b4d0ba2286c0d4d44ba81260c2b287016019 (patch)
tree0a21f0761528e0f79da0a9f67106eb128ace0cf7 /xlators/nfs/server/src/nfs-fops.c
parent73b60c87ca7f62517a8466431f5a8cf167589c8c (diff)
parentf2bac9f9d5b9956969ddd25a54bc636b82f6923e (diff)
Merge branch 'upstream'HEADmaster
Conflicts: rpc/xdr/src/glusterfs3-xdr.c rpc/xdr/src/glusterfs3-xdr.h xlators/features/changelog/src/Makefile.am xlators/features/changelog/src/changelog-helpers.h xlators/features/changelog/src/changelog.c xlators/mgmt/glusterd/src/glusterd-sm.c Change-Id: I9972a5e6184503477eb77a8b56c50a4db4eec3e2
Diffstat (limited to 'xlators/nfs/server/src/nfs-fops.c')
-rw-r--r--xlators/nfs/server/src/nfs-fops.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/xlators/nfs/server/src/nfs-fops.c b/xlators/nfs/server/src/nfs-fops.c
index b91f73a53..56d4cba47 100644
--- a/xlators/nfs/server/src/nfs-fops.c
+++ b/xlators/nfs/server/src/nfs-fops.c
@@ -38,20 +38,25 @@ nfs_fix_groups (xlator_t *this, call_stack_t *root)
struct passwd mypw;
char mystrs[1024];
struct passwd *result;
+#ifdef GF_DARWIN_HOST_OS
+ /* BSD/DARWIN does not correctly uses gid_t in getgrouplist */
+ int mygroups[GF_MAX_AUX_GROUPS];
+#else
gid_t mygroups[GF_MAX_AUX_GROUPS];
+#endif
int ngroups;
int i;
int max_groups;
struct nfs_state *priv = this->private;
const gid_list_t *agl;
- gid_list_t gl;
+ gid_list_t gl;
if (!priv->server_aux_gids) {
return;
}
- /* RPC enforces the GF_AUTH_GLUSTERFS_MAX_GROUPS limit */
- max_groups = GF_AUTH_GLUSTERFS_MAX_GROUPS(root->lk_owner.len);
+ /* RPC enforces the GF_AUTH_GLUSTERFS_MAX_GROUPS limit */
+ max_groups = GF_AUTH_GLUSTERFS_MAX_GROUPS(root->lk_owner.len);
agl = gid_cache_lookup(&priv->gid_cache, root->uid, 0, 0);
if (agl) {