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
a3ae59c6
Commit
a3ae59c6
authored
Nov 17, 2015
by
Stéphane Graber
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #697 from hallyn/2015-11-12/seccomp
seccomp: handle inverted arch
parents
5eea90e8
473ebc77
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
seccomp.c
src/lxc/seccomp.c
+13
-4
No files found.
src/lxc/seccomp.c
View file @
a3ae59c6
...
@@ -296,10 +296,19 @@ static int parse_config_v2(FILE *f, char *line, struct lxc_conf *conf)
...
@@ -296,10 +296,19 @@ static int parse_config_v2(FILE *f, char *line, struct lxc_conf *conf)
if
(
native_arch
==
lxc_seccomp_arch_amd64
)
{
if
(
native_arch
==
lxc_seccomp_arch_amd64
)
{
cur_rule_arch
=
lxc_seccomp_arch_all
;
cur_rule_arch
=
lxc_seccomp_arch_all
;
compat_arch
=
SCMP_ARCH_X86
;
compat_arch
=
SCMP_ARCH_X86
;
compat_ctx
=
get_new_ctx
(
lxc_seccomp_arch_i386
,
// Detect if we are on x86_64 kernel with 32-bit userspace
default_policy_action
);
if
(
seccomp_arch_exist
(
conf
->
seccomp_ctx
,
SCMP_ARCH_X86
))
{
if
(
!
compat_ctx
)
compat_ctx
=
conf
->
seccomp_ctx
;
goto
bad
;
conf
->
seccomp_ctx
=
get_new_ctx
(
lxc_seccomp_arch_amd64
,
default_policy_action
);
if
(
!
conf
->
seccomp_ctx
)
goto
bad
;
}
else
{
compat_ctx
=
get_new_ctx
(
lxc_seccomp_arch_i386
,
default_policy_action
);
if
(
!
compat_ctx
)
goto
bad
;
}
}
}
if
(
default_policy_action
!=
SCMP_ACT_KILL
)
{
if
(
default_policy_action
!=
SCMP_ACT_KILL
)
{
...
...
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