Unverified Commit da5f5e3f by Serge Hallyn Committed by GitHub

Merge pull request #2052 from brauner/2017-12-19/unprivileged_btrfs_regression

btrfs: fix unprivileged snapshot creation
parents b5b200c6 4aaf9b81
...@@ -469,11 +469,11 @@ bool btrfs_create_snapshot(struct lxc_conf *conf, struct lxc_storage *orig, ...@@ -469,11 +469,11 @@ bool btrfs_create_snapshot(struct lxc_conf *conf, struct lxc_storage *orig,
if (am_unpriv()) { if (am_unpriv()) {
struct rsync_data_char args; struct rsync_data_char args;
args.src = orig->dest; args.src = orig->src;
args.dest = new->dest; args.dest = new->dest;
ret = userns_exec_1(conf, btrfs_snapshot_wrapper, &args, ret = userns_exec_1(conf, btrfs_snapshot_wrapper, &args,
"btrfs_snapshot_wrapper"); "btrfs_snapshot_wrapper");
if (ret < 0) { if (ret < 0) {
ERROR("Failed to run \"btrfs_snapshot_wrapper\""); ERROR("Failed to run \"btrfs_snapshot_wrapper\"");
return false; return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment