Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
8d334acd
Commit
8d334acd
authored
Jul 24, 2011
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switch is_sxid() to umode_t
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
62bb1091
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
fs/attr.c
fs/attr.c
+2
-2
include/linux/fs.h
include/linux/fs.h
+1
-1
No files found.
fs/attr.c
View file @
8d334acd
...
@@ -166,7 +166,7 @@ EXPORT_SYMBOL(setattr_copy);
...
@@ -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
;
u
mode_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)
...
@@ -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
;
u
mode_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
;
...
...
include/linux/fs.h
View file @
8d334acd
...
@@ -2690,7 +2690,7 @@ int __init get_filesystem_list(char *buf);
...
@@ -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
(
u
mode_t
mode
)
{
{
return
(
mode
&
S_ISUID
)
||
((
mode
&
S_ISGID
)
&&
(
mode
&
S_IXGRP
));
return
(
mode
&
S_ISUID
)
||
((
mode
&
S_ISGID
)
&&
(
mode
&
S_IXGRP
));
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment