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
4f0ba8f6
Unverified
Commit
4f0ba8f6
authored
Sep 09, 2017
by
Christian Brauner
Committed by
Stéphane Graber
Sep 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lxccontainer: use userns_exec_full()
Closes #1800. Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
dfb8c303
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
lxccontainer.c
src/lxc/lxccontainer.c
+11
-6
No files found.
src/lxc/lxccontainer.c
View file @
4f0ba8f6
...
@@ -2569,12 +2569,17 @@ static bool has_snapshots(struct lxc_container *c)
...
@@ -2569,12 +2569,17 @@ static bool has_snapshots(struct lxc_container *c)
}
}
static
bool
do_destroy_container
(
struct
lxc_conf
*
conf
)
{
static
bool
do_destroy_container
(
struct
lxc_conf
*
conf
)
{
int
ret
;
if
(
am_unpriv
())
{
if
(
am_unpriv
())
{
if
(
userns_exec_1
(
conf
,
storage_destroy_wrapper
,
conf
,
ret
=
userns_exec_full
(
conf
,
storage_destroy_wrapper
,
conf
,
"storage_destroy_wrapper"
)
<
0
)
"storage_destroy_wrapper"
);
if
(
ret
<
0
)
return
false
;
return
false
;
return
true
;
return
true
;
}
}
return
storage_destroy
(
conf
);
return
storage_destroy
(
conf
);
}
}
...
@@ -2708,8 +2713,8 @@ static bool container_destroy(struct lxc_container *c,
...
@@ -2708,8 +2713,8 @@ static bool container_destroy(struct lxc_container *c,
if
(
ret
<
0
||
(
size_t
)
ret
>=
len
)
if
(
ret
<
0
||
(
size_t
)
ret
>=
len
)
goto
out
;
goto
out
;
if
(
am_unpriv
())
if
(
am_unpriv
())
ret
=
userns_exec_
1
(
conf
,
lxc_rmdir_onedev_wrapper
,
path
,
ret
=
userns_exec_
full
(
conf
,
lxc_rmdir_onedev_wrapper
,
path
,
"lxc_rmdir_onedev_wrapper"
);
"lxc_rmdir_onedev_wrapper"
);
else
else
ret
=
lxc_rmdir_onedev
(
path
,
"snaps"
);
ret
=
lxc_rmdir_onedev
(
path
,
"snaps"
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
...
@@ -3551,8 +3556,8 @@ static struct lxc_container *do_lxcapi_clone(struct lxc_container *c, const char
...
@@ -3551,8 +3556,8 @@ static struct lxc_container *do_lxcapi_clone(struct lxc_container *c, const char
data
.
flags
=
flags
;
data
.
flags
=
flags
;
data
.
hookargs
=
hookargs
;
data
.
hookargs
=
hookargs
;
if
(
am_unpriv
())
if
(
am_unpriv
())
ret
=
userns_exec_
1
(
c
->
lxc_conf
,
clone_update_rootfs_wrapper
,
ret
=
userns_exec_
full
(
c
->
lxc_conf
,
clone_update_rootfs_wrapper
,
&
data
,
"clone_update_rootfs_wrapper"
);
&
data
,
"clone_update_rootfs_wrapper"
);
else
else
ret
=
clone_update_rootfs
(
&
data
);
ret
=
clone_update_rootfs
(
&
data
);
if
(
ret
<
0
)
if
(
ret
<
0
)
...
...
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