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
3e3e5695
Commit
3e3e5695
authored
Jan 16, 2017
by
John Johansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apparmor: allow introspecting the policy namespace name
Signed-off-by:
John Johansen
<
john.johansen@canonical.com
>
parent
b79473f2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
security/apparmor/apparmorfs.c
security/apparmor/apparmorfs.c
+24
-0
No files found.
security/apparmor/apparmorfs.c
View file @
3e3e5695
...
...
@@ -356,6 +356,7 @@ static const struct file_operations aa_fs_seq_hash_fops = {
.
release
=
single_release
,
};
static
int
aa_fs_seq_show_ns_level
(
struct
seq_file
*
seq
,
void
*
v
)
{
struct
aa_ns
*
ns
=
aa_current_profile
()
->
ns
;
...
...
@@ -378,6 +379,28 @@ static const struct file_operations aa_fs_ns_level = {
.
release
=
single_release
,
};
static
int
aa_fs_seq_show_ns_name
(
struct
seq_file
*
seq
,
void
*
v
)
{
struct
aa_ns
*
ns
=
aa_current_profile
()
->
ns
;
seq_printf
(
seq
,
"%s
\n
"
,
ns
->
base
.
name
);
return
0
;
}
static
int
aa_fs_seq_open_ns_name
(
struct
inode
*
inode
,
struct
file
*
file
)
{
return
single_open
(
file
,
aa_fs_seq_show_ns_name
,
inode
->
i_private
);
}
static
const
struct
file_operations
aa_fs_ns_name
=
{
.
owner
=
THIS_MODULE
,
.
open
=
aa_fs_seq_open_ns_name
,
.
read
=
seq_read
,
.
llseek
=
seq_lseek
,
.
release
=
single_release
,
};
/** fns to setup dynamic per profile/namespace files **/
void
__aa_fs_profile_rmdir
(
struct
aa_profile
*
profile
)
{
...
...
@@ -852,6 +875,7 @@ static struct aa_fs_entry aa_fs_entry_apparmor[] = {
AA_FS_FILE_FOPS
(
".replace"
,
0640
,
&
aa_fs_profile_replace
),
AA_FS_FILE_FOPS
(
".remove"
,
0640
,
&
aa_fs_profile_remove
),
AA_FS_FILE_FOPS
(
".ns_level"
,
0666
,
&
aa_fs_ns_level
),
AA_FS_FILE_FOPS
(
".ns_name"
,
0640
,
&
aa_fs_ns_name
),
AA_FS_FILE_FOPS
(
"profiles"
,
0640
,
&
aa_fs_profiles_fops
),
AA_FS_DIR
(
"features"
,
aa_fs_entry_features
),
{
}
...
...
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