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
adf0ba1f
Unverified
Commit
adf0ba1f
authored
May 02, 2018
by
Liza Tretyakova
Committed by
Christian Brauner
Jul 22, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conf, confile: introduce basic structs for shared mount point
Signed-off-by:
Liza Tretyakova
<
elizabet.tretyakova@gmail.com
>
parent
a633a1ed
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
0 deletions
+15
-0
conf.c
src/lxc/conf.c
+4
-0
conf.h
src/lxc/conf.h
+10
-0
confile.c
src/lxc/confile.c
+1
-0
No files found.
src/lxc/conf.c
View file @
adf0ba1f
...
...
@@ -2714,6 +2714,8 @@ struct lxc_conf *lxc_conf_init(void)
new
->
lsm_aa_profile
=
NULL
;
new
->
lsm_se_context
=
NULL
;
new
->
tmp_umount_proc
=
false
;
new
->
lxc_shmount
.
path_host
=
NULL
;
new
->
lxc_shmount
.
path_cont
=
NULL
;
/* if running in a new user namespace, init and COMMAND
* default to running as UID/GID 0 when using lxc-execute */
...
...
@@ -4041,6 +4043,8 @@ void lxc_conf_free(struct lxc_conf *conf)
lxc_clear_procs
(
conf
,
"lxc.proc"
);
free
(
conf
->
cgroup_meta
.
dir
);
free
(
conf
->
cgroup_meta
.
controllers
);
free
(
conf
->
lxc_shmount
.
path_host
);
free
(
conf
->
lxc_shmount
.
path_cont
);
free
(
conf
);
}
...
...
src/lxc/conf.h
View file @
adf0ba1f
...
...
@@ -189,6 +189,9 @@ enum {
LXC_AUTO_CGROUP_FULL_NOSPEC
=
0x0E0
,
/* /sys/fs/cgroup (full mount, r/w or mixed, depending on caps) */
LXC_AUTO_CGROUP_FORCE
=
0x100
,
/* mount cgroups even when cgroup namespaces are supported */
LXC_AUTO_CGROUP_MASK
=
0x1F0
,
/* all known cgroup options, doe not contain LXC_AUTO_CGROUP_FORCE */
LXC_AUTO_SHMOUNTS
=
0x200
,
/* shared mount point */
LXC_AUTO_SHMOUNTS_MASK
=
0x200
,
/* shared mount point mask */
LXC_AUTO_ALL_MASK
=
0x1FF
,
/* all known settings */
};
...
...
@@ -367,6 +370,13 @@ struct lxc_conf {
/* procs */
struct
lxc_list
procs
;
struct
lxc_shmount
{
/* Absolute path to the shared mount point on the host */
char
*
path_host
;
/* Absolute path (in the container) to the shared mount point */
char
*
path_cont
;
}
lxc_shmount
;
};
extern
int
write_id_mapping
(
enum
idtype
idtype
,
pid_t
pid
,
const
char
*
buf
,
...
...
src/lxc/confile.c
View file @
adf0ba1f
...
...
@@ -1659,6 +1659,7 @@ static int set_config_mount_auto(const char *key, const char *value,
{
"cgroup-full:mixed:force"
,
LXC_AUTO_CGROUP_MASK
,
LXC_AUTO_CGROUP_FULL_MIXED
|
LXC_AUTO_CGROUP_FORCE
},
{
"cgroup-full:ro:force"
,
LXC_AUTO_CGROUP_MASK
,
LXC_AUTO_CGROUP_FULL_RO
|
LXC_AUTO_CGROUP_FORCE
},
{
"cgroup-full:rw:force"
,
LXC_AUTO_CGROUP_MASK
,
LXC_AUTO_CGROUP_FULL_RW
|
LXC_AUTO_CGROUP_FORCE
},
{
"shmounts:"
,
LXC_AUTO_SHMOUNTS_MASK
,
LXC_AUTO_SHMOUNTS
},
/* For adding anything that is just a single on/off, but has no
* options: keep mask and flag identical and just define the enum
* value as an unused bit so far
...
...
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