[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>
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;
}