]> rtime.felk.cvut.cz Git - linux-imx.git/commit
NFS: Fix access to suid/sgid executables
authorWeston Andros Adamson <dros@netapp.com>
Thu, 3 Jan 2013 21:42:29 +0000 (16:42 -0500)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 3 Jan 2013 22:06:27 +0000 (17:06 -0500)
commitf8d9a897d4384b77f13781ea813156568f68b83e
treec34e5e5b5da7a6c46d1d12b7408ef5312a55e8ca
parentd1c3ed669a2d452cacfb48c2d171a1f364dae2ed
NFS: Fix access to suid/sgid executables

nfs_open_permission_mask() should only check MAY_EXEC for files that
are opened with __FMODE_EXEC.

Also fix NFSv4 access-in-open path in a similar way -- openflags must be
used because fmode will not always have FMODE_EXEC set.

This patch fixes https://bugzilla.kernel.org/show_bug.cgi?id=49101

Signed-off-by: Weston Andros Adamson <dros@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@vger.kernel.org
fs/nfs/dir.c
fs/nfs/nfs4proc.c