]> git.proxmox.com Git - mirror_lxc.git/blobdiff - src/lxc/storage/btrfs.c
Restore most cases of am_guest_unpriv
[mirror_lxc.git] / src / lxc / storage / btrfs.c
index 4e21020fdfc370ec7ca1126ad3c68c6b645e0a33..3b6b8d96e9ffb3b8580f847de641791ac4ff4c16 100644 (file)
@@ -434,7 +434,7 @@ bool btrfs_create_clone(struct lxc_conf *conf, struct lxc_storage *orig,
        /* rsync the contents from source to target */
        data.orig = orig;
        data.new = new;
-       if (am_host_unpriv()) {
+       if (am_guest_unpriv()) {
                ret = userns_exec_full(conf, lxc_storage_rsync_exec_wrapper,
                                       &data, "lxc_storage_rsync_exec_wrapper");
                if (ret < 0) {
@@ -466,7 +466,7 @@ bool btrfs_create_snapshot(struct lxc_conf *conf, struct lxc_storage *orig,
        if (ret < 0 && errno != ENOENT)
                return false;
 
-       if (am_host_unpriv()) {
+       if (am_guest_unpriv()) {
                struct rsync_data_char args;
 
                args.src = orig->src;