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
a5ee97e6
Unverified
Commit
a5ee97e6
authored
Feb 05, 2020
by
Christian Brauner
Committed by
GitHub
Feb 05, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3261 from blenk92/fix-parse-config
container.conf: Fix parsing of config options:
parents
a8b9febd
20c3318a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
confile.c
src/lxc/confile.c
+13
-2
No files found.
src/lxc/confile.c
View file @
a5ee97e6
...
@@ -148,6 +148,17 @@ lxc_config_define(uts_name);
...
@@ -148,6 +148,17 @@ lxc_config_define(uts_name);
lxc_config_define
(
sysctl
);
lxc_config_define
(
sysctl
);
lxc_config_define
(
proc
);
lxc_config_define
(
proc
);
/*
* Important Note:
* If a new config option is added to this table, be aware that
* the order in which the options are places into the table matters.
* That means that more specific options of a namespace have to be
* placed above more generic ones.
*
* For instance: If lxc.ab is placed before lxc.ab.c, the config option
* lxc.ab.c will always be matched to lxc.ab. That is, the lxc.ab.c option
* has to be placed above lxc.ab.
*/
static
struct
lxc_config_t
config_jump_table
[]
=
{
static
struct
lxc_config_t
config_jump_table
[]
=
{
{
"lxc.arch"
,
set_config_personality
,
get_config_personality
,
clr_config_personality
,
},
{
"lxc.arch"
,
set_config_personality
,
get_config_personality
,
clr_config_personality
,
},
{
"lxc.apparmor.profile"
,
set_config_apparmor_profile
,
get_config_apparmor_profile
,
clr_config_apparmor_profile
,
},
{
"lxc.apparmor.profile"
,
set_config_apparmor_profile
,
get_config_apparmor_profile
,
clr_config_apparmor_profile
,
},
...
@@ -235,8 +246,8 @@ static struct lxc_config_t config_jump_table[] = {
...
@@ -235,8 +246,8 @@ static struct lxc_config_t config_jump_table[] = {
{
"lxc.seccomp.notify.cookie"
,
set_config_seccomp_notify_cookie
,
get_config_seccomp_notify_cookie
,
clr_config_seccomp_notify_cookie
,
},
{
"lxc.seccomp.notify.cookie"
,
set_config_seccomp_notify_cookie
,
get_config_seccomp_notify_cookie
,
clr_config_seccomp_notify_cookie
,
},
{
"lxc.seccomp.notify.proxy"
,
set_config_seccomp_notify_proxy
,
get_config_seccomp_notify_proxy
,
clr_config_seccomp_notify_proxy
,
},
{
"lxc.seccomp.notify.proxy"
,
set_config_seccomp_notify_proxy
,
get_config_seccomp_notify_proxy
,
clr_config_seccomp_notify_proxy
,
},
{
"lxc.seccomp.profile"
,
set_config_seccomp_profile
,
get_config_seccomp_profile
,
clr_config_seccomp_profile
,
},
{
"lxc.seccomp.profile"
,
set_config_seccomp_profile
,
get_config_seccomp_profile
,
clr_config_seccomp_profile
,
},
{
"lxc.selinux.context"
,
set_config_selinux_context
,
get_config_selinux_context
,
clr_config_selinux_context
,
},
{
"lxc.selinux.context.keyring"
,
set_config_selinux_context_keyring
,
get_config_selinux_context_keyring
,
clr_config_selinux_context_keyring
},
{
"lxc.selinux.context.keyring"
,
set_config_selinux_context_keyring
,
get_config_selinux_context_keyring
,
clr_config_selinux_context_keyring
},
{
"lxc.selinux.context"
,
set_config_selinux_context
,
get_config_selinux_context
,
clr_config_selinux_context
,
},
{
"lxc.signal.halt"
,
set_config_signal_halt
,
get_config_signal_halt
,
clr_config_signal_halt
,
},
{
"lxc.signal.halt"
,
set_config_signal_halt
,
get_config_signal_halt
,
clr_config_signal_halt
,
},
{
"lxc.signal.reboot"
,
set_config_signal_reboot
,
get_config_signal_reboot
,
clr_config_signal_reboot
,
},
{
"lxc.signal.reboot"
,
set_config_signal_reboot
,
get_config_signal_reboot
,
clr_config_signal_reboot
,
},
{
"lxc.signal.stop"
,
set_config_signal_stop
,
get_config_signal_stop
,
clr_config_signal_stop
,
},
{
"lxc.signal.stop"
,
set_config_signal_stop
,
get_config_signal_stop
,
clr_config_signal_stop
,
},
...
@@ -4929,7 +4940,7 @@ static struct lxc_config_t *get_network_config_ops(const char *key,
...
@@ -4929,7 +4940,7 @@ static struct lxc_config_t *get_network_config_ops(const char *key,
}
}
memmove
(
copy
+
8
,
idx_end
+
1
,
strlen
(
idx_end
+
1
));
memmove
(
copy
+
8
,
idx_end
+
1
,
strlen
(
idx_end
+
1
));
copy
[
strlen
(
key
)
-
numstrlen
+
1
]
=
'\0'
;
copy
[
strlen
(
key
)
-
(
numstrlen
+
1
)
]
=
'\0'
;
config
=
lxc_get_config
(
copy
);
config
=
lxc_get_config
(
copy
);
if
(
!
config
)
{
if
(
!
config
)
{
...
...
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