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
cf916000
Commit
cf916000
authored
Feb 05, 2018
by
John Johansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apparmor: cleanup create_aafs() error path
Signed-off-by:
John Johansen
<
john.johansen@canonical.com
>
parent
d901d6a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
20 deletions
+12
-20
security/apparmor/apparmorfs.c
security/apparmor/apparmorfs.c
+12
-20
No files found.
security/apparmor/apparmorfs.c
View file @
cf916000
...
@@ -2458,34 +2458,26 @@ static int __init aa_create_aafs(void)
...
@@ -2458,34 +2458,26 @@ static int __init aa_create_aafs(void)
dent
=
securityfs_create_file
(
".load"
,
0666
,
aa_sfs_entry
.
dentry
,
dent
=
securityfs_create_file
(
".load"
,
0666
,
aa_sfs_entry
.
dentry
,
NULL
,
&
aa_fs_profile_load
);
NULL
,
&
aa_fs_profile_load
);
if
(
IS_ERR
(
dent
))
{
if
(
IS_ERR
(
dent
))
error
=
PTR_ERR
(
dent
);
goto
dent_error
;
goto
error
;
}
ns_subload
(
root_ns
)
=
dent
;
ns_subload
(
root_ns
)
=
dent
;
dent
=
securityfs_create_file
(
".replace"
,
0666
,
aa_sfs_entry
.
dentry
,
dent
=
securityfs_create_file
(
".replace"
,
0666
,
aa_sfs_entry
.
dentry
,
NULL
,
&
aa_fs_profile_replace
);
NULL
,
&
aa_fs_profile_replace
);
if
(
IS_ERR
(
dent
))
{
if
(
IS_ERR
(
dent
))
error
=
PTR_ERR
(
dent
);
goto
dent_error
;
goto
error
;
}
ns_subreplace
(
root_ns
)
=
dent
;
ns_subreplace
(
root_ns
)
=
dent
;
dent
=
securityfs_create_file
(
".remove"
,
0666
,
aa_sfs_entry
.
dentry
,
dent
=
securityfs_create_file
(
".remove"
,
0666
,
aa_sfs_entry
.
dentry
,
NULL
,
&
aa_fs_profile_remove
);
NULL
,
&
aa_fs_profile_remove
);
if
(
IS_ERR
(
dent
))
{
if
(
IS_ERR
(
dent
))
error
=
PTR_ERR
(
dent
);
goto
dent_error
;
goto
error
;
}
ns_subremove
(
root_ns
)
=
dent
;
ns_subremove
(
root_ns
)
=
dent
;
dent
=
securityfs_create_file
(
"revision"
,
0444
,
aa_sfs_entry
.
dentry
,
dent
=
securityfs_create_file
(
"revision"
,
0444
,
aa_sfs_entry
.
dentry
,
NULL
,
&
aa_fs_ns_revision_fops
);
NULL
,
&
aa_fs_ns_revision_fops
);
if
(
IS_ERR
(
dent
))
{
if
(
IS_ERR
(
dent
))
error
=
PTR_ERR
(
dent
);
goto
dent_error
;
goto
error
;
}
ns_subrevision
(
root_ns
)
=
dent
;
ns_subrevision
(
root_ns
)
=
dent
;
/* policy tree referenced by magic policy symlink */
/* policy tree referenced by magic policy symlink */
...
@@ -2499,10 +2491,8 @@ static int __init aa_create_aafs(void)
...
@@ -2499,10 +2491,8 @@ static int __init aa_create_aafs(void)
/* magic symlink similar to nsfs redirects based on task policy */
/* magic symlink similar to nsfs redirects based on task policy */
dent
=
securityfs_create_symlink
(
"policy"
,
aa_sfs_entry
.
dentry
,
dent
=
securityfs_create_symlink
(
"policy"
,
aa_sfs_entry
.
dentry
,
NULL
,
&
policy_link_iops
);
NULL
,
&
policy_link_iops
);
if
(
IS_ERR
(
dent
))
{
if
(
IS_ERR
(
dent
))
error
=
PTR_ERR
(
dent
);
goto
dent_error
;
goto
error
;
}
error
=
aa_mk_null_file
(
aa_sfs_entry
.
dentry
);
error
=
aa_mk_null_file
(
aa_sfs_entry
.
dentry
);
if
(
error
)
if
(
error
)
...
@@ -2514,6 +2504,8 @@ static int __init aa_create_aafs(void)
...
@@ -2514,6 +2504,8 @@ static int __init aa_create_aafs(void)
aa_info_message
(
"AppArmor Filesystem Enabled"
);
aa_info_message
(
"AppArmor Filesystem Enabled"
);
return
0
;
return
0
;
dent_error:
error
=
PTR_ERR
(
dent
);
error:
error:
aa_destroy_aafs
();
aa_destroy_aafs
();
AA_ERROR
(
"Error creating AppArmor securityfs
\n
"
);
AA_ERROR
(
"Error creating AppArmor securityfs
\n
"
);
...
...
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