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
61a53c32
Unverified
Commit
61a53c32
authored
May 29, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conf: make tmp_umount_proc bool
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
c03d7a78
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
conf.c
src/lxc/conf.c
+5
-5
conf.h
src/lxc/conf.h
+1
-1
No files found.
src/lxc/conf.c
View file @
61a53c32
...
@@ -2676,7 +2676,7 @@ struct lxc_conf *lxc_conf_init(void)
...
@@ -2676,7 +2676,7 @@ struct lxc_conf *lxc_conf_init(void)
lxc_list_init
(
&
new
->
state_clients
);
lxc_list_init
(
&
new
->
state_clients
);
new
->
lsm_aa_profile
=
NULL
;
new
->
lsm_aa_profile
=
NULL
;
new
->
lsm_se_context
=
NULL
;
new
->
lsm_se_context
=
NULL
;
new
->
tmp_umount_proc
=
0
;
new
->
tmp_umount_proc
=
false
;
/* if running in a new user namespace, init and COMMAND
/* if running in a new user namespace, init and COMMAND
* default to running as UID/GID 0 when using lxc-execute */
* default to running as UID/GID 0 when using lxc-execute */
...
@@ -3158,7 +3158,7 @@ int lxc_create_tmp_proc_mount(struct lxc_conf *conf)
...
@@ -3158,7 +3158,7 @@ int lxc_create_tmp_proc_mount(struct lxc_conf *conf)
if
(
conf
->
rootfs
.
path
)
if
(
conf
->
rootfs
.
path
)
return
-
1
;
return
-
1
;
}
else
if
(
mounted
==
1
)
{
}
else
if
(
mounted
==
1
)
{
conf
->
tmp_umount_proc
=
1
;
conf
->
tmp_umount_proc
=
true
;
}
}
return
0
;
return
0
;
...
@@ -3166,11 +3166,11 @@ int lxc_create_tmp_proc_mount(struct lxc_conf *conf)
...
@@ -3166,11 +3166,11 @@ int lxc_create_tmp_proc_mount(struct lxc_conf *conf)
void
tmp_proc_unmount
(
struct
lxc_conf
*
lxc_conf
)
void
tmp_proc_unmount
(
struct
lxc_conf
*
lxc_conf
)
{
{
if
(
lxc_conf
->
tmp_umount_proc
!=
1
)
if
(
!
lxc_conf
->
tmp_umount_proc
)
return
;
return
;
umount
(
"/proc"
);
(
void
)
umount2
(
"/proc"
,
MNT_DETACH
);
lxc_conf
->
tmp_umount_proc
=
0
;
lxc_conf
->
tmp_umount_proc
=
false
;
}
}
/* Walk /proc/mounts and change any shared entries to slave. */
/* Walk /proc/mounts and change any shared entries to slave. */
...
...
src/lxc/conf.h
View file @
61a53c32
...
@@ -271,7 +271,7 @@ struct lxc_conf {
...
@@ -271,7 +271,7 @@ struct lxc_conf {
char
*
lsm_aa_profile
;
char
*
lsm_aa_profile
;
unsigned
int
lsm_aa_allow_incomplete
;
unsigned
int
lsm_aa_allow_incomplete
;
char
*
lsm_se_context
;
char
*
lsm_se_context
;
int
tmp_umount_proc
;
bool
tmp_umount_proc
;
char
*
seccomp
;
/* filename with the seccomp rules */
char
*
seccomp
;
/* filename with the seccomp rules */
#if HAVE_SCMP_FILTER_CTX
#if HAVE_SCMP_FILTER_CTX
scmp_filter_ctx
seccomp_ctx
;
scmp_filter_ctx
seccomp_ctx
;
...
...
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