Re: [PATCH] access-denied problems with knfsd-981022

Steven N. Hirsch (shirsch@adelphia.net)
Sat, 31 Oct 1998 00:16:22 -0500 (EST)


On Fri, 30 Oct 1998, G. Allen Morris III wrote:

> Here is patch to solve one of you access problems.
>

Interesting! I spotted an analagous problem in sunrpc/auth_unix.c at
about 2.1.90 and posted a patch (which Linus applied after waving his
magic wand over it <g>). Never noticed this one.

My symptoms were an inability to mount from an IBM RT running BSD4.3.

Good spotting.

Steve

> index: linux/fs/nfsd/auth.c
> ===================================================================
> RCS file: /home/cvs/cvsroot/linux/fs/nfsd/auth.c,v
> retrieving revision 1.1.2.1
> diff -u -r1.1.2.1 auth.c
> --- auth.c 1998/10/27 06:21:59 1.1.2.1
> +++ auth.c 1998/10/30 22:56:12
> @@ -41,8 +41,12 @@
> current->fsgid = cred->cr_gid;
> else
> current->fsgid = exp->ex_anon_gid;
> - for (i = 0; i < NGROUPS; i++)
> + for (i = 0; i < NGROUPS; i++) {
> current->groups[i] = cred->cr_groups[i];
> + if (current->groups[i] == NOGROUP)
> + break;
> + }
> + current->ngroups = i;
>
> if ((cred->cr_uid)) {
> cap_lower(current->cap_effective, CAP_DAC_OVERRIDE);
> ===================================================================
>
>
> ---------------------------------
> G. Allen Morris III
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.rutgers.edu
> Please read the FAQ at http://www.tux.org/lkml/
>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/