Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
passt-mac
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Simon Ruderich
passt-mac
Commits
55ef3c34
Commit
55ef3c34
authored
8 years ago
by
Simon Ruderich
Browse files
Options
Downloads
Patches
Plain Diff
slsm: fix build with 4.7
parent
53f9d273
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
security/slsm/lsm.c
+10
-10
10 additions, 10 deletions
security/slsm/lsm.c
with
10 additions
and
10 deletions
security/slsm/lsm.c
+
10
−
10
View file @
55ef3c34
...
...
@@ -298,7 +298,7 @@ static int passt_file_open(struct file *file, const struct cred *cred) {
return
passt_path_common
(
&
file
->
f_path
,
cred
,
perms_want
);
}
static
int
passt_path_link
(
struct
dentry
*
old_dentry
,
struct
path
*
new_dir
,
static
int
passt_path_link
(
struct
dentry
*
old_dentry
,
const
struct
path
*
new_dir
,
struct
dentry
*
new_dentry
)
{
const
struct
cred
*
cred
=
current_cred
();
const
struct
passt_task
*
pt
=
cred
->
security
;
...
...
@@ -336,44 +336,44 @@ cleanup:
return
ret
;
}
static
int
passt_path_symlink
(
struct
path
*
dir
,
struct
dentry
*
dentry
,
static
int
passt_path_symlink
(
const
struct
path
*
dir
,
struct
dentry
*
dentry
,
const
char
*
old_name
)
{
/* Symlinks are always followed so there's no need to verify the
* target here. */
return
passt_path_common
(
dir
,
current_cred
(),
SLSM_PERMS_W
);
}
static
int
passt_path_unlink
(
struct
path
*
dir
,
struct
dentry
*
dentry
)
{
static
int
passt_path_unlink
(
const
struct
path
*
dir
,
struct
dentry
*
dentry
)
{
return
passt_path_common
(
dir
,
current_cred
(),
SLSM_PERMS_W
);
}
static
int
passt_path_rename
(
struct
path
*
old_dir
,
struct
dentry
*
old_dentry
,
struct
path
*
new_dir
,
struct
dentry
*
new_dentry
)
{
static
int
passt_path_rename
(
const
struct
path
*
old_dir
,
struct
dentry
*
old_dentry
,
const
struct
path
*
new_dir
,
struct
dentry
*
new_dentry
)
{
if
(
passt_path_common
(
old_dir
,
current_cred
(),
SLSM_PERMS_W
)
||
passt_path_common
(
new_dir
,
current_cred
(),
SLSM_PERMS_W
))
return
-
EACCES
;
return
0
;
}
static
int
passt_path_mkdir
(
struct
path
*
dir
,
struct
dentry
*
dentry
,
static
int
passt_path_mkdir
(
const
struct
path
*
dir
,
struct
dentry
*
dentry
,
umode_t
mode
)
{
return
passt_path_common
(
dir
,
current_cred
(),
SLSM_PERMS_W
);
}
static
int
passt_path_rmdir
(
struct
path
*
dir
,
struct
dentry
*
dentry
)
{
static
int
passt_path_rmdir
(
const
struct
path
*
dir
,
struct
dentry
*
dentry
)
{
return
passt_path_common
(
dir
,
current_cred
(),
SLSM_PERMS_W
);
}
static
int
passt_path_mknod
(
struct
path
*
dir
,
struct
dentry
*
dentry
,
static
int
passt_path_mknod
(
const
struct
path
*
dir
,
struct
dentry
*
dentry
,
umode_t
mode
,
unsigned
int
dev
)
{
return
passt_path_common
(
dir
,
current_cred
(),
SLSM_PERMS_W
);
}
static
int
passt_path_chmod
(
struct
path
*
path
,
umode_t
mode
)
{
static
int
passt_path_chmod
(
const
struct
path
*
path
,
umode_t
mode
)
{
return
passt_path_common
(
path
,
current_cred
(),
SLSM_PERMS_W
);
}
static
int
passt_path_chown
(
struct
path
*
path
,
kuid_t
uid
,
kgid_t
gid
)
{
static
int
passt_path_chown
(
const
struct
path
*
path
,
kuid_t
uid
,
kgid_t
gid
)
{
return
passt_path_common
(
path
,
current_cred
(),
SLSM_PERMS_W
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment