mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
switch is_sxid() to umode_t
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -166,7 +166,7 @@ EXPORT_SYMBOL(setattr_copy);
|
|||||||
int notify_change(struct dentry * dentry, struct iattr * attr)
|
int notify_change(struct dentry * dentry, struct iattr * attr)
|
||||||
{
|
{
|
||||||
struct inode *inode = dentry->d_inode;
|
struct inode *inode = dentry->d_inode;
|
||||||
mode_t mode = inode->i_mode;
|
umode_t mode = inode->i_mode;
|
||||||
int error;
|
int error;
|
||||||
struct timespec now;
|
struct timespec now;
|
||||||
unsigned int ia_valid = attr->ia_valid;
|
unsigned int ia_valid = attr->ia_valid;
|
||||||
@@ -177,7 +177,7 @@ int notify_change(struct dentry * dentry, struct iattr * attr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((ia_valid & ATTR_MODE)) {
|
if ((ia_valid & ATTR_MODE)) {
|
||||||
mode_t amode = attr->ia_mode;
|
umode_t amode = attr->ia_mode;
|
||||||
/* Flag setting protected by i_mutex */
|
/* Flag setting protected by i_mutex */
|
||||||
if (is_sxid(amode))
|
if (is_sxid(amode))
|
||||||
inode->i_flags &= ~S_NOSEC;
|
inode->i_flags &= ~S_NOSEC;
|
||||||
|
@@ -2690,7 +2690,7 @@ int __init get_filesystem_list(char *buf);
|
|||||||
#define OPEN_FMODE(flag) ((__force fmode_t)(((flag + 1) & O_ACCMODE) | \
|
#define OPEN_FMODE(flag) ((__force fmode_t)(((flag + 1) & O_ACCMODE) | \
|
||||||
(flag & __FMODE_NONOTIFY)))
|
(flag & __FMODE_NONOTIFY)))
|
||||||
|
|
||||||
static inline int is_sxid(mode_t mode)
|
static inline int is_sxid(umode_t mode)
|
||||||
{
|
{
|
||||||
return (mode & S_ISUID) || ((mode & S_ISGID) && (mode & S_IXGRP));
|
return (mode & S_ISUID) || ((mode & S_ISGID) && (mode & S_IXGRP));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user