Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
Linux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
jan.koester
Linux
Commits
ca4bd5ae
Commit
ca4bd5ae
authored
8 years ago
by
John Johansen
Browse files
Options
Downloads
Patches
Plain Diff
apparmor: add check for apparmor enabled in module parameters missing it
Signed-off-by:
John Johansen
<
john.johansen@canonical.com
>
parent
d4669f0b
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
security/apparmor/lsm.c
+10
-0
10 additions, 0 deletions
security/apparmor/lsm.c
with
10 additions
and
0 deletions
security/apparmor/lsm.c
+
10
−
0
View file @
ca4bd5ae
...
...
@@ -750,6 +750,8 @@ static int param_get_aalockpolicy(char *buffer, const struct kernel_param *kp)
{
if
(
!
policy_view_capable
(
NULL
))
return
-
EPERM
;
if
(
!
apparmor_enabled
)
return
-
EINVAL
;
return
param_get_bool
(
buffer
,
kp
);
}
...
...
@@ -757,6 +759,8 @@ static int param_set_aabool(const char *val, const struct kernel_param *kp)
{
if
(
!
policy_admin_capable
(
NULL
))
return
-
EPERM
;
if
(
!
apparmor_enabled
)
return
-
EINVAL
;
return
param_set_bool
(
val
,
kp
);
}
...
...
@@ -764,6 +768,8 @@ static int param_get_aabool(char *buffer, const struct kernel_param *kp)
{
if
(
!
policy_view_capable
(
NULL
))
return
-
EPERM
;
if
(
!
apparmor_enabled
)
return
-
EINVAL
;
return
param_get_bool
(
buffer
,
kp
);
}
...
...
@@ -771,6 +777,8 @@ static int param_set_aauint(const char *val, const struct kernel_param *kp)
{
if
(
!
policy_admin_capable
(
NULL
))
return
-
EPERM
;
if
(
!
apparmor_enabled
)
return
-
EINVAL
;
return
param_set_uint
(
val
,
kp
);
}
...
...
@@ -778,6 +786,8 @@ static int param_get_aauint(char *buffer, const struct kernel_param *kp)
{
if
(
!
policy_view_capable
(
NULL
))
return
-
EPERM
;
if
(
!
apparmor_enabled
)
return
-
EINVAL
;
return
param_get_uint
(
buffer
,
kp
);
}
...
...
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