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
2c24b8ba
Unverified
Commit
2c24b8ba
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
storage: use userns_exec_full()
Closes #1800. Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
454d6a18
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
9 deletions
+9
-9
aufs.c
src/lxc/storage/aufs.c
+2
-2
btrfs.c
src/lxc/storage/btrfs.c
+2
-2
overlay.c
src/lxc/storage/overlay.c
+2
-2
storage.c
src/lxc/storage/storage.c
+3
-2
storage.h
src/lxc/storage/storage.h
+0
-1
No files found.
src/lxc/storage/aufs.c
View file @
2c24b8ba
...
...
@@ -164,8 +164,8 @@ int aufs_clonepaths(struct lxc_storage *orig, struct lxc_storage *new,
rdata
.
src
=
odelta
;
rdata
.
dest
=
ndelta
;
if
(
am_unpriv
())
ret
=
userns_exec_
1
(
conf
,
lxc_rsync_delta_wrapper
,
&
rdata
,
"lxc_rsync_delta_wrapper"
);
ret
=
userns_exec_
full
(
conf
,
lxc_rsync_delta_wrapper
,
&
rdata
,
"lxc_rsync_delta_wrapper"
);
else
ret
=
run_command
(
cmd_output
,
sizeof
(
cmd_output
),
lxc_rsync_delta_wrapper
,
...
...
src/lxc/storage/btrfs.c
View file @
2c24b8ba
...
...
@@ -434,8 +434,8 @@ bool btrfs_create_clone(struct lxc_conf *conf, struct lxc_storage *orig,
data
.
orig
=
orig
;
data
.
new
=
new
;
if
(
am_unpriv
())
{
ret
=
userns_exec_
1
(
conf
,
lxc_storage_rsync_exec_wrapper
,
&
data
,
"lxc_storage_rsync_exec_wrapper"
);
ret
=
userns_exec_
full
(
conf
,
lxc_storage_rsync_exec_wrapper
,
&
data
,
"lxc_storage_rsync_exec_wrapper"
);
if
(
ret
<
0
)
{
ERROR
(
"Failed to rsync from
\"
%s
\"
into
\"
%s
\"
"
,
orig
->
dest
,
new
->
dest
);
...
...
src/lxc/storage/overlay.c
View file @
2c24b8ba
...
...
@@ -971,8 +971,8 @@ static int ovl_do_rsync(const char *src, const char *dest,
rdata
.
src
=
(
char
*
)
src
;
rdata
.
dest
=
(
char
*
)
dest
;
if
(
am_unpriv
())
ret
=
userns_exec_
1
(
conf
,
lxc_rsync_exec_wrapper
,
&
rdata
,
"lxc_rsync_exec_wrapper"
);
ret
=
userns_exec_
full
(
conf
,
lxc_rsync_exec_wrapper
,
&
rdata
,
"lxc_rsync_exec_wrapper"
);
else
ret
=
run_command
(
cmd_output
,
sizeof
(
cmd_output
),
lxc_rsync_exec_wrapper
,
(
void
*
)
&
rdata
);
...
...
src/lxc/storage/storage.c
View file @
2c24b8ba
...
...
@@ -502,8 +502,9 @@ struct lxc_storage *storage_copy(struct lxc_container *c, const char *cname,
data
.
orig
=
orig
;
data
.
new
=
new
;
if
(
am_unpriv
())
ret
=
userns_exec_1
(
c
->
lxc_conf
,
lxc_storage_rsync_exec_wrapper
,
&
data
,
"lxc_storage_rsync_exec_wrapper"
);
ret
=
userns_exec_full
(
c
->
lxc_conf
,
lxc_storage_rsync_exec_wrapper
,
&
data
,
"lxc_storage_rsync_exec_wrapper"
);
else
ret
=
run_command
(
cmd_output
,
sizeof
(
cmd_output
),
lxc_storage_rsync_exec_wrapper
,
(
void
*
)
&
data
);
...
...
src/lxc/storage/storage.h
View file @
2c24b8ba
...
...
@@ -136,7 +136,6 @@ extern struct lxc_storage *storage_create(const char *dest, const char *type,
extern
void
storage_put
(
struct
lxc_storage
*
bdev
);
extern
bool
storage_destroy
(
struct
lxc_conf
*
conf
);
/* callback function to be used with userns_exec_1() */
extern
int
storage_destroy_wrapper
(
void
*
data
);
extern
bool
rootfs_is_blockdev
(
struct
lxc_conf
*
conf
);
extern
char
*
lxc_storage_get_path
(
char
*
src
,
const
char
*
prefix
);
...
...
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