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
4e5a9657
Unverified
Commit
4e5a9657
authored
Dec 17, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lxccontainer: fix mount api (mount_injection_file)
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
8465a7f4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
api_extensions.h
src/lxc/api_extensions.h
+1
-0
lxccontainer.c
src/lxc/lxccontainer.c
+4
-1
No files found.
src/lxc/api_extensions.h
View file @
4e5a9657
...
@@ -40,6 +40,7 @@ static char *api_extensions[] = {
...
@@ -40,6 +40,7 @@ static char *api_extensions[] = {
"reboot2"
,
"reboot2"
,
"mount_injection"
,
"mount_injection"
,
"cgroup_relative"
,
"cgroup_relative"
,
"mount_injection_file"
,
};
};
static
size_t
nr_api_extensions
=
sizeof
(
api_extensions
)
/
sizeof
(
*
api_extensions
);
static
size_t
nr_api_extensions
=
sizeof
(
api_extensions
)
/
sizeof
(
*
api_extensions
);
...
...
src/lxc/lxccontainer.c
View file @
4e5a9657
...
@@ -5045,10 +5045,13 @@ static int do_lxcapi_mount(struct lxc_container *c, const char *source,
...
@@ -5045,10 +5045,13 @@ static int do_lxcapi_mount(struct lxc_container *c, const char *source,
/* Enter the container namespaces */
/* Enter the container namespaces */
if
(
!
lxc_list_empty
(
&
c
->
lxc_conf
->
id_map
))
{
if
(
!
lxc_list_empty
(
&
c
->
lxc_conf
->
id_map
))
{
if
(
!
switch_to_ns
(
init_pid
,
"user"
)){
if
(
!
switch_to_ns
(
init_pid
,
"user"
))
{
ERROR
(
"Failed to enter user namespace"
);
ERROR
(
"Failed to enter user namespace"
);
_exit
(
EXIT_FAILURE
);
_exit
(
EXIT_FAILURE
);
}
}
if
(
!
lxc_switch_uid_gid
(
0
,
0
))
_exit
(
EXIT_FAILURE
);
}
}
if
(
!
switch_to_ns
(
init_pid
,
"mnt"
))
{
if
(
!
switch_to_ns
(
init_pid
,
"mnt"
))
{
...
...
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