syscall_fs2: Add parentheses to fix gcc warning
authorTormod Volden <debian.tormod@gmail.com>
Fri, 15 Mar 2019 21:47:19 +0000 (22:47 +0100)
committerAlan Cox <alan@linux.intel.com>
Wed, 27 Mar 2019 11:45:35 +0000 (11:45 +0000)
[Alan's note: This is correct. The condition checks are really confusing and
 probably we should have an in_group type test that includes the egid.]

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Kernel/syscall_fs2.c

index f7b5a3d..bd337e7 100644 (file)
@@ -261,7 +261,7 @@ static int chown_op(inoptr ino)
        if (group != -1) {
                /* We must be in the target group (and file owner) */
                if ((ino->c_node.i_uid != udata.u_euid ||
-                       group != udata.u_egid && !in_group(group)) && esuper())
+                       (group != udata.u_egid && !in_group(group))) && esuper())
                        return -1;
                ino->c_node.i_gid = group;
        }