]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Fix selinux_file_fcntl
authorAndrew Morton <akpm@osdl.org>
Sun, 31 Aug 2003 11:31:07 +0000 (04:31 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Sun, 31 Aug 2003 11:31:07 +0000 (04:31 -0700)
From: Stephen Smalley <sds@epoch.ncsc.mil>, James Morris <jmorris@redhat.com>

This patch adds the appropriate #if around the F_*64 commands in the
selinux_file_fcntl hook function.

security/selinux/hooks.c

index 9083e09b6b4e85d14c7976f03edf833f4336228a..56504d0e5c1630358b1a83daddb9ec9db058709c 100644 (file)
@@ -2057,9 +2057,11 @@ static int selinux_file_fcntl(struct file *file, unsigned int cmd,
                case F_GETLK:
                case F_SETLK:
                case F_SETLKW:
+#if BITS_PER_LONG == 32
                case F_GETLK64:
                case F_SETLK64:
                case F_SETLKW64:
+#endif
                        if (!file->f_dentry || !file->f_dentry->d_inode) {
                                err = -EINVAL;
                                break;