Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
527d15f8
Unverified
Commit
527d15f8
authored
May 25, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
seccomp: lxc_read_seccomp_config()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
3b09ea5a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
seccomp.c
src/lxc/seccomp.c
+8
-8
No files found.
src/lxc/seccomp.c
View file @
527d15f8
...
@@ -1124,7 +1124,7 @@ static bool use_seccomp(void)
...
@@ -1124,7 +1124,7 @@ static bool use_seccomp(void)
int
lxc_read_seccomp_config
(
struct
lxc_conf
*
conf
)
int
lxc_read_seccomp_config
(
struct
lxc_conf
*
conf
)
{
{
int
check_seccomp_attr_set
,
ret
;
int
ret
;
FILE
*
f
;
FILE
*
f
;
if
(
!
conf
->
seccomp
)
if
(
!
conf
->
seccomp
)
...
@@ -1148,19 +1148,19 @@ int lxc_read_seccomp_config(struct lxc_conf *conf)
...
@@ -1148,19 +1148,19 @@ int lxc_read_seccomp_config(struct lxc_conf *conf)
/* turn off no-new-privs. We don't want it in lxc, and it breaks
/* turn off no-new-privs. We don't want it in lxc, and it breaks
* with apparmor */
* with apparmor */
#if HAVE_SCMP_FILTER_CTX
#if HAVE_SCMP_FILTER_CTX
check_seccomp_attr_s
et
=
seccomp_attr_set
(
conf
->
seccomp_ctx
,
SCMP_FLTATR_CTL_NNP
,
0
);
r
et
=
seccomp_attr_set
(
conf
->
seccomp_ctx
,
SCMP_FLTATR_CTL_NNP
,
0
);
#else
#else
check_seccomp_attr_s
et
=
seccomp_attr_set
(
SCMP_FLTATR_CTL_NNP
,
0
);
r
et
=
seccomp_attr_set
(
SCMP_FLTATR_CTL_NNP
,
0
);
#endif
#endif
if
(
check_seccomp_attr_set
)
{
if
(
ret
<
0
)
{
ERROR
(
"%s - Failed to turn off no-new-privs"
,
strerror
(
-
check_seccomp_attr_s
et
));
ERROR
(
"%s - Failed to turn off no-new-privs"
,
strerror
(
-
r
et
));
return
-
1
;
return
-
1
;
}
}
#ifdef SCMP_FLTATR_ATL_TSKIP
#ifdef SCMP_FLTATR_ATL_TSKIP
check_seccomp_attr_s
et
=
seccomp_attr_set
(
conf
->
seccomp_ctx
,
SCMP_FLTATR_ATL_TSKIP
,
1
);
r
et
=
seccomp_attr_set
(
conf
->
seccomp_ctx
,
SCMP_FLTATR_ATL_TSKIP
,
1
);
if
(
check_seccomp_attr_s
et
<
0
)
if
(
r
et
<
0
)
WARN
(
"%s - Failed to turn on seccomp nop-skip, continuing"
,
WARN
(
"%s - Failed to turn on seccomp nop-skip, continuing"
,
strerror
(
-
check_seccomp_attr_s
et
));
strerror
(
-
r
et
));
#endif
#endif
f
=
fopen
(
conf
->
seccomp
,
"r"
);
f
=
fopen
(
conf
->
seccomp
,
"r"
);
...
...
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