mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Fix fchange in zpl_ioctl_setflags
The fchange in zpl_ioctl_setflags was for detecting flag change. However it was incorrect and would always fail to detect a flag change from set to unset, causing users without CAP_LINUX_IMMUTABLE to be able to unset flags. Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
This commit is contained in:
@@ -737,8 +737,7 @@ zpl_ioctl_getflags(struct file *filp, void __user *arg)
|
||||
* is outside of our jurisdiction.
|
||||
*/
|
||||
|
||||
#define fchange(f0, f1, b0, b1) ((((f0) & (b0)) == (b0)) != \
|
||||
(((b1) & (f1)) == (f1)))
|
||||
#define fchange(f0, f1, b0, b1) (!((f0) & (b0)) != !((f1) & (b1)))
|
||||
|
||||
static int
|
||||
zpl_ioctl_setflags(struct file *filp, void __user *arg)
|
||||
|
||||
Reference in New Issue
Block a user