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
nexedi
linux
Commits
3ccee46a
Commit
3ccee46a
authored
Mar 25, 2016
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
constify security_path_{link,rename}
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
8db01856
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
18 deletions
+18
-18
include/linux/lsm_hooks.h
include/linux/lsm_hooks.h
+3
-3
include/linux/security.h
include/linux/security.h
+6
-6
security/apparmor/lsm.c
security/apparmor/lsm.c
+3
-3
security/security.c
security/security.c
+3
-3
security/tomoyo/tomoyo.c
security/tomoyo/tomoyo.c
+3
-3
No files found.
include/linux/lsm_hooks.h
View file @
3ccee46a
...
...
@@ -1369,10 +1369,10 @@ union security_list_options {
int
(
*
path_truncate
)(
const
struct
path
*
path
);
int
(
*
path_symlink
)(
const
struct
path
*
dir
,
struct
dentry
*
dentry
,
const
char
*
old_name
);
int
(
*
path_link
)(
struct
dentry
*
old_dentry
,
struct
path
*
new_dir
,
int
(
*
path_link
)(
struct
dentry
*
old_dentry
,
const
struct
path
*
new_dir
,
struct
dentry
*
new_dentry
);
int
(
*
path_rename
)(
struct
path
*
old_dir
,
struct
dentry
*
old_dentry
,
struct
path
*
new_dir
,
int
(
*
path_rename
)(
const
struct
path
*
old_dir
,
struct
dentry
*
old_dentry
,
const
struct
path
*
new_dir
,
struct
dentry
*
new_dentry
);
int
(
*
path_chmod
)(
const
struct
path
*
path
,
umode_t
mode
);
int
(
*
path_chown
)(
const
struct
path
*
path
,
kuid_t
uid
,
kgid_t
gid
);
...
...
include/linux/security.h
View file @
3ccee46a
...
...
@@ -1450,10 +1450,10 @@ int security_path_mknod(const struct path *dir, struct dentry *dentry, umode_t m
int
security_path_truncate
(
const
struct
path
*
path
);
int
security_path_symlink
(
const
struct
path
*
dir
,
struct
dentry
*
dentry
,
const
char
*
old_name
);
int
security_path_link
(
struct
dentry
*
old_dentry
,
struct
path
*
new_dir
,
int
security_path_link
(
struct
dentry
*
old_dentry
,
const
struct
path
*
new_dir
,
struct
dentry
*
new_dentry
);
int
security_path_rename
(
struct
path
*
old_dir
,
struct
dentry
*
old_dentry
,
struct
path
*
new_dir
,
struct
dentry
*
new_dentry
,
int
security_path_rename
(
const
struct
path
*
old_dir
,
struct
dentry
*
old_dentry
,
const
struct
path
*
new_dir
,
struct
dentry
*
new_dentry
,
unsigned
int
flags
);
int
security_path_chmod
(
const
struct
path
*
path
,
umode_t
mode
);
int
security_path_chown
(
const
struct
path
*
path
,
kuid_t
uid
,
kgid_t
gid
);
...
...
@@ -1493,15 +1493,15 @@ static inline int security_path_symlink(const struct path *dir, struct dentry *d
}
static
inline
int
security_path_link
(
struct
dentry
*
old_dentry
,
struct
path
*
new_dir
,
const
struct
path
*
new_dir
,
struct
dentry
*
new_dentry
)
{
return
0
;
}
static
inline
int
security_path_rename
(
struct
path
*
old_dir
,
static
inline
int
security_path_rename
(
const
struct
path
*
old_dir
,
struct
dentry
*
old_dentry
,
struct
path
*
new_dir
,
const
struct
path
*
new_dir
,
struct
dentry
*
new_dentry
,
unsigned
int
flags
)
{
...
...
security/apparmor/lsm.c
View file @
3ccee46a
...
...
@@ -280,7 +280,7 @@ static int apparmor_path_symlink(const struct path *dir, struct dentry *dentry,
S_IFLNK
);
}
static
int
apparmor_path_link
(
struct
dentry
*
old_dentry
,
struct
path
*
new_dir
,
static
int
apparmor_path_link
(
struct
dentry
*
old_dentry
,
const
struct
path
*
new_dir
,
struct
dentry
*
new_dentry
)
{
struct
aa_profile
*
profile
;
...
...
@@ -295,8 +295,8 @@ static int apparmor_path_link(struct dentry *old_dentry, struct path *new_dir,
return
error
;
}
static
int
apparmor_path_rename
(
struct
path
*
old_dir
,
struct
dentry
*
old_dentry
,
struct
path
*
new_dir
,
struct
dentry
*
new_dentry
)
static
int
apparmor_path_rename
(
const
struct
path
*
old_dir
,
struct
dentry
*
old_dentry
,
const
struct
path
*
new_dir
,
struct
dentry
*
new_dentry
)
{
struct
aa_profile
*
profile
;
int
error
=
0
;
...
...
security/security.c
View file @
3ccee46a
...
...
@@ -450,7 +450,7 @@ int security_path_symlink(const struct path *dir, struct dentry *dentry,
return
call_int_hook
(
path_symlink
,
0
,
dir
,
dentry
,
old_name
);
}
int
security_path_link
(
struct
dentry
*
old_dentry
,
struct
path
*
new_dir
,
int
security_path_link
(
struct
dentry
*
old_dentry
,
const
struct
path
*
new_dir
,
struct
dentry
*
new_dentry
)
{
if
(
unlikely
(
IS_PRIVATE
(
d_backing_inode
(
old_dentry
))))
...
...
@@ -458,8 +458,8 @@ int security_path_link(struct dentry *old_dentry, struct path *new_dir,
return
call_int_hook
(
path_link
,
0
,
old_dentry
,
new_dir
,
new_dentry
);
}
int
security_path_rename
(
struct
path
*
old_dir
,
struct
dentry
*
old_dentry
,
struct
path
*
new_dir
,
struct
dentry
*
new_dentry
,
int
security_path_rename
(
const
struct
path
*
old_dir
,
struct
dentry
*
old_dentry
,
const
struct
path
*
new_dir
,
struct
dentry
*
new_dentry
,
unsigned
int
flags
)
{
if
(
unlikely
(
IS_PRIVATE
(
d_backing_inode
(
old_dentry
))
||
...
...
security/tomoyo/tomoyo.c
View file @
3ccee46a
...
...
@@ -265,7 +265,7 @@ static int tomoyo_path_mknod(const struct path *parent, struct dentry *dentry,
*
* Returns 0 on success, negative value otherwise.
*/
static
int
tomoyo_path_link
(
struct
dentry
*
old_dentry
,
struct
path
*
new_dir
,
static
int
tomoyo_path_link
(
struct
dentry
*
old_dentry
,
const
struct
path
*
new_dir
,
struct
dentry
*
new_dentry
)
{
struct
path
path1
=
{
new_dir
->
mnt
,
old_dentry
};
...
...
@@ -283,9 +283,9 @@ static int tomoyo_path_link(struct dentry *old_dentry, struct path *new_dir,
*
* Returns 0 on success, negative value otherwise.
*/
static
int
tomoyo_path_rename
(
struct
path
*
old_parent
,
static
int
tomoyo_path_rename
(
const
struct
path
*
old_parent
,
struct
dentry
*
old_dentry
,
struct
path
*
new_parent
,
const
struct
path
*
new_parent
,
struct
dentry
*
new_dentry
)
{
struct
path
path1
=
{
old_parent
->
mnt
,
old_dentry
};
...
...
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