--- ./include/linux/sunrpc/msg_prot.h.orig 2004-05-10 04:32:54.000000000 +0200 +++ ./include/linux/sunrpc/msg_prot.h 2005-05-05 18:15:27.000000000 +0200 @@ -75,6 +75,7 @@ #define RPC_PMAP_PORT 111 #define RPC_MAXNETNAMELEN 256 +#define RPC_MAXGROUPS 16 #endif /* __KERNEL__ */ #endif /* _LINUX_SUNRPC_MSGPROT_H_ */ --- ./include/linux/sunrpc/svcauth.h.orig 2005-05-05 18:03:56.000000000 +0200 +++ ./include/linux/sunrpc/svcauth.h 2005-05-05 18:15:27.000000000 +0200 @@ -16,7 +16,6 @@ #include #include -#define SVC_CRED_NGROUPS 32 struct svc_cred { uid_t cr_uid; gid_t cr_gid; --- ./net/sunrpc/auth.c.orig 2005-05-05 18:04:01.000000000 +0200 +++ ./net/sunrpc/auth.c 2005-05-05 18:15:27.000000000 +0200 @@ -235,7 +235,7 @@ cred = new; } - return (struct rpc_cred *) cred; + return cred; } struct rpc_cred * --- ./net/sunrpc/auth_gss/auth_gss.c.orig 2005-05-05 18:04:01.000000000 +0200 +++ ./net/sunrpc/auth_gss/auth_gss.c 2005-05-05 18:15:27.000000000 +0200 @@ -63,8 +63,6 @@ # define RPCDBG_FACILITY RPCDBG_AUTH #endif -#define NFS_NGROUPS 16 - #define GSS_CRED_EXPIRE (60 * HZ) /* XXX: reasonable? */ #define GSS_CRED_SLACK 1024 /* XXX: unused */ /* length of a krb5 verifier (48), plus data added before arguments when --- ./net/sunrpc/auth_unix.c.orig 2005-05-05 18:04:01.000000000 +0200 +++ ./net/sunrpc/auth_unix.c 2005-05-05 18:23:16.000000000 +0200 @@ -14,12 +14,10 @@ #include #include -#define NFS_NGROUPS 16 - struct unx_cred { struct rpc_cred uc_base; gid_t uc_gid; - gid_t uc_gids[NFS_NGROUPS]; + gid_t uc_gids[RPC_MAXGROUPS]; }; #define uc_uid uc_base.cr_uid #define uc_count uc_base.cr_count @@ -83,15 +81,15 @@ cred->uc_gids[0] = NOGROUP; } else { int groups = acred->group_info->ngroups; - if (groups > NFS_NGROUPS) - groups = NFS_NGROUPS; + if (groups > RPC_MAXGROUPS) + groups = RPC_MAXGROUPS; cred->uc_uid = acred->uid; cred->uc_gid = acred->gid; for (i = 0; i < groups; i++) cred->uc_gids[i] = GROUP_AT(acred->group_info, i); - if (i < NFS_NGROUPS) - cred->uc_gids[i] = NOGROUP; + if (i < RPC_MAXGROUPS) + cred->uc_gids[i] = NOGROUP; } cred->uc_base.cr_ops = &unix_credops; @@ -123,8 +121,8 @@ return 0; groups = acred->group_info->ngroups; - if (groups > NFS_NGROUPS) - groups = NFS_NGROUPS; + if (groups > RPC_MAXGROUPS) + groups = RPC_MAXGROUPS; for (i = 0; i < groups ; i++) if (cred->uc_gids[i] != GROUP_AT(acred->group_info, i)) return 0; @@ -159,7 +157,7 @@ *p++ = htonl((u32) cred->uc_uid); *p++ = htonl((u32) cred->uc_gid); hold = p++; - for (i = 0; i < 16 && cred->uc_gids[i] != (gid_t) NOGROUP; i++) + for (i = 0; i < RPC_MAXGROUPS && cred->uc_gids[i] != (gid_t) NOGROUP; i++) *p++ = htonl((u32) cred->uc_gids[i]); *hold = htonl(p - hold - 1); /* gid array length */ *base = htonl((p - base - 1) << 2); /* cred length */ --- ./net/sunrpc/svcauth_unix.c.orig 2005-05-05 18:04:01.000000000 +0200 +++ ./net/sunrpc/svcauth_unix.c 2005-05-05 18:15:27.000000000 +0200 @@ -450,7 +450,7 @@ cred->cr_uid = ntohl(svc_getu32(argv)); /* uid */ cred->cr_gid = ntohl(svc_getu32(argv)); /* gid */ slen = ntohl(svc_getu32(argv)); /* gids length */ - if (slen > 16 || (len -= (slen + 2)*4) < 0) + if (slen > RPC_MAXGROUPS || (len -= (slen + 2)*4) < 0) goto badcred; cred->cr_group_info = groups_alloc(slen); if (cred->cr_group_info == NULL)