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
e68d7e3c
Commit
e68d7e3c
authored
Oct 28, 2016
by
Christian Brauner
Committed by
Stéphane Graber
Nov 21, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conf/ile: use lxc_safe_u/int() in config_start()
Signed-off-by:
Christian Brauner
<
christian.brauner@canonical.com
>
parent
773d5831
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
conf.h
src/lxc/conf.h
+2
-2
confile.c
src/lxc/confile.c
+8
-3
No files found.
src/lxc/conf.h
View file @
e68d7e3c
...
...
@@ -343,8 +343,8 @@ struct lxc_conf {
int
inherit_ns_fd
[
LXC_NS_MAX
];
int
start_auto
;
int
start_delay
;
unsigned
int
start_auto
;
unsigned
int
start_delay
;
int
start_order
;
struct
lxc_list
groups
;
int
nbd_idx
;
...
...
src/lxc/confile.c
View file @
e68d7e3c
...
...
@@ -1147,15 +1147,20 @@ static int config_start(const char *key, const char *value,
struct
lxc_conf
*
lxc_conf
)
{
if
(
strcmp
(
key
,
"lxc.start.auto"
)
==
0
)
{
lxc_conf
->
start_auto
=
atoi
(
value
);
if
(
lxc_safe_uint
(
value
,
&
lxc_conf
->
start_auto
)
<
0
)
return
-
1
;
if
(
lxc_conf
->
start_auto
>
1
)
return
-
1
;
return
0
;
}
else
if
(
strcmp
(
key
,
"lxc.start.delay"
)
==
0
)
{
lxc_conf
->
start_delay
=
atoi
(
value
);
if
(
lxc_safe_uint
(
value
,
&
lxc_conf
->
start_delay
)
<
0
)
return
-
1
;
return
0
;
}
else
if
(
strcmp
(
key
,
"lxc.start.order"
)
==
0
)
{
lxc_conf
->
start_order
=
atoi
(
value
);
if
(
lxc_safe_int
(
value
,
&
lxc_conf
->
start_order
)
<
0
)
return
-
1
;
return
0
;
}
SYSERROR
(
"Unknown key: %s"
,
key
);
...
...
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