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
b80927f2
Unverified
Commit
b80927f2
authored
May 31, 2017
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
confile: add getter for lxc.cap.keep
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
1c96d6d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
21 deletions
+21
-21
confile.c
src/lxc/confile.c
+21
-21
No files found.
src/lxc/confile.c
View file @
b80927f2
...
...
@@ -153,6 +153,8 @@ static int set_config_cap_drop(const char *, const char *, struct lxc_conf *);
static
int
get_config_cap_drop
(
struct
lxc_container
*
,
const
char
*
,
char
*
,
int
);
static
int
set_config_cap_keep
(
const
char
*
,
const
char
*
,
struct
lxc_conf
*
);
static
int
get_config_cap_keep
(
struct
lxc_container
*
,
const
char
*
,
char
*
,
int
);
static
int
set_config_console
(
const
char
*
,
const
char
*
,
struct
lxc_conf
*
);
static
int
set_config_console_logfile
(
const
char
*
,
const
char
*
,
struct
lxc_conf
*
);
static
int
set_config_seccomp
(
const
char
*
,
const
char
*
,
struct
lxc_conf
*
);
...
...
@@ -224,7 +226,7 @@ static struct lxc_config_t config[] = {
{
"lxc.network."
,
set_config_network_nic
,
get_config_network_item
,
NULL
},
{
"lxc.network"
,
set_config_network
,
get_config_network
,
NULL
},
{
"lxc.cap.drop"
,
set_config_cap_drop
,
get_config_cap_drop
,
NULL
},
{
"lxc.cap.keep"
,
set_config_cap_keep
,
NULL
,
NULL
},
{
"lxc.cap.keep"
,
set_config_cap_keep
,
get_config_cap_keep
,
NULL
},
{
"lxc.console.logfile"
,
set_config_console_logfile
,
NULL
,
NULL
},
{
"lxc.console"
,
set_config_console
,
NULL
,
NULL
},
{
"lxc.seccomp"
,
set_config_seccomp
,
NULL
,
NULL
},
...
...
@@ -2716,22 +2718,6 @@ static int lxc_get_item_environment(struct lxc_conf *c, char *retv, int inlen)
return
fulllen
;
}
static
int
lxc_get_item_cap_keep
(
struct
lxc_conf
*
c
,
char
*
retv
,
int
inlen
)
{
int
len
,
fulllen
=
0
;
struct
lxc_list
*
it
;
if
(
!
retv
)
inlen
=
0
;
else
memset
(
retv
,
0
,
inlen
);
lxc_list_for_each
(
it
,
&
c
->
keepcaps
)
{
strprint
(
retv
,
inlen
,
"%s
\n
"
,
(
char
*
)
it
->
elem
);
}
return
fulllen
;
}
int
lxc_get_config_item
(
struct
lxc_conf
*
c
,
const
char
*
key
,
char
*
retv
,
int
inlen
)
{
...
...
@@ -2741,8 +2727,6 @@ int lxc_get_config_item(struct lxc_conf *c, const char *key, char *retv,
v
=
c
->
console
.
log_path
;
else
if
(
strcmp
(
key
,
"lxc.console"
)
==
0
)
v
=
c
->
console
.
path
;
else
if
(
strcmp
(
key
,
"lxc.cap.keep"
)
==
0
)
return
lxc_get_item_cap_keep
(
c
,
retv
,
inlen
);
else
if
(
strcmp
(
key
,
"lxc.start.auto"
)
==
0
)
return
lxc_get_conf_int
(
c
,
retv
,
inlen
,
c
->
start_auto
);
else
if
(
strcmp
(
key
,
"lxc.start.delay"
)
==
0
)
...
...
@@ -3885,8 +3869,24 @@ static int get_config_cap_drop(struct lxc_container *c, const char *key,
else
memset
(
retv
,
0
,
inlen
);
lxc_list_for_each
(
it
,
&
c
->
lxc_conf
->
caps
)
{
lxc_list_for_each
(
it
,
&
c
->
lxc_conf
->
caps
)
{
strprint
(
retv
,
inlen
,
"%s
\n
"
,
(
char
*
)
it
->
elem
);
}
return
fulllen
;
}
static
int
get_config_cap_keep
(
struct
lxc_container
*
c
,
const
char
*
key
,
char
*
retv
,
int
inlen
)
{
int
len
,
fulllen
=
0
;
struct
lxc_list
*
it
;
if
(
!
retv
)
inlen
=
0
;
else
memset
(
retv
,
0
,
inlen
);
lxc_list_for_each
(
it
,
&
c
->
lxc_conf
->
keepcaps
)
{
strprint
(
retv
,
inlen
,
"%s
\n
"
,
(
char
*
)
it
->
elem
);
}
return
fulllen
;
...
...
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