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
2c7661ff
Commit
2c7661ff
authored
Mar 25, 2016
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[apparmor] constify struct path * in a bunch of helpers
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
f55532a0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
8 deletions
+8
-8
security/apparmor/file.c
security/apparmor/file.c
+1
-1
security/apparmor/include/file.h
security/apparmor/include/file.h
+1
-1
security/apparmor/include/path.h
security/apparmor/include/path.h
+1
-1
security/apparmor/lsm.c
security/apparmor/lsm.c
+1
-1
security/apparmor/path.c
security/apparmor/path.c
+4
-4
No files found.
security/apparmor/file.c
View file @
2c7661ff
...
...
@@ -275,7 +275,7 @@ static inline bool is_deleted(struct dentry *dentry)
*
* Returns: %0 else error if access denied or other error
*/
int
aa_path_perm
(
int
op
,
struct
aa_profile
*
profile
,
struct
path
*
path
,
int
aa_path_perm
(
int
op
,
struct
aa_profile
*
profile
,
const
struct
path
*
path
,
int
flags
,
u32
request
,
struct
path_cond
*
cond
)
{
char
*
buffer
=
NULL
;
...
...
security/apparmor/include/file.h
View file @
2c7661ff
...
...
@@ -171,7 +171,7 @@ unsigned int aa_str_perms(struct aa_dfa *dfa, unsigned int start,
const
char
*
name
,
struct
path_cond
*
cond
,
struct
file_perms
*
perms
);
int
aa_path_perm
(
int
op
,
struct
aa_profile
*
profile
,
struct
path
*
path
,
int
aa_path_perm
(
int
op
,
struct
aa_profile
*
profile
,
const
struct
path
*
path
,
int
flags
,
u32
request
,
struct
path_cond
*
cond
);
int
aa_path_link
(
struct
aa_profile
*
profile
,
struct
dentry
*
old_dentry
,
...
...
security/apparmor/include/path.h
View file @
2c7661ff
...
...
@@ -26,7 +26,7 @@ enum path_flags {
PATH_MEDIATE_DELETED
=
0x10000
,
/* mediate deleted paths */
};
int
aa_path_name
(
struct
path
*
path
,
int
flags
,
char
**
buffer
,
int
aa_path_name
(
const
struct
path
*
path
,
int
flags
,
char
**
buffer
,
const
char
**
name
,
const
char
**
info
);
#endif
/* __AA_PATH_H */
security/apparmor/lsm.c
View file @
2c7661ff
...
...
@@ -149,7 +149,7 @@ static int apparmor_capable(const struct cred *cred, struct user_namespace *ns,
*
* Returns: %0 else error code if error or permission denied
*/
static
int
common_perm
(
int
op
,
struct
path
*
path
,
u32
mask
,
static
int
common_perm
(
int
op
,
const
struct
path
*
path
,
u32
mask
,
struct
path_cond
*
cond
)
{
struct
aa_profile
*
profile
;
...
...
security/apparmor/path.c
View file @
2c7661ff
...
...
@@ -53,7 +53,7 @@ static int prepend(char **buffer, int buflen, const char *str, int namelen)
* When no error the path name is returned in @name which points to
* to a position in @buf
*/
static
int
d_namespace_path
(
struct
path
*
path
,
char
*
buf
,
int
buflen
,
static
int
d_namespace_path
(
const
struct
path
*
path
,
char
*
buf
,
int
buflen
,
char
**
name
,
int
flags
)
{
char
*
res
;
...
...
@@ -158,7 +158,7 @@ static int d_namespace_path(struct path *path, char *buf, int buflen,
*
* Returns: %0 else error on failure
*/
static
int
get_name_to_buffer
(
struct
path
*
path
,
int
flags
,
char
*
buffer
,
static
int
get_name_to_buffer
(
const
struct
path
*
path
,
int
flags
,
char
*
buffer
,
int
size
,
char
**
name
,
const
char
**
info
)
{
int
adjust
=
(
flags
&
PATH_IS_DIR
)
?
1
:
0
;
...
...
@@ -204,8 +204,8 @@ static int get_name_to_buffer(struct path *path, int flags, char *buffer,
*
* Returns: %0 else error code if could retrieve name
*/
int
aa_path_name
(
struct
path
*
path
,
int
flags
,
char
**
buffer
,
const
char
**
name
,
const
char
**
info
)
int
aa_path_name
(
const
struct
path
*
path
,
int
flags
,
char
**
buffer
,
const
char
**
name
,
const
char
**
info
)
{
char
*
buf
,
*
str
=
NULL
;
int
size
=
256
;
...
...
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