Message ID | 20230223152044.1064909-6-amir73il@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Backport v6.2 SGID fixes to LTS 6.1 | expand |
diff --git a/include/linux/fs.h b/include/linux/fs.h index ed555aa9bf48..f14ecbeab2a9 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -3549,7 +3549,7 @@ int __init list_bdev_fs_names(char *buf, size_t size); static inline bool is_sxid(umode_t mode) { - return (mode & S_ISUID) || ((mode & S_ISGID) && (mode & S_IXGRP)); + return mode & (S_ISUID | S_ISGID); } static inline int check_sticky(struct user_namespace *mnt_userns,