summaryrefslogtreecommitdiff
path: root/hosts/vidhar/borg/copy.py
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/vidhar/borg/copy.py')
-rwxr-xr-xhosts/vidhar/borg/copy.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/hosts/vidhar/borg/copy.py b/hosts/vidhar/borg/copy.py
index 64ae0a71..4bfae1cb 100755
--- a/hosts/vidhar/borg/copy.py
+++ b/hosts/vidhar/borg/copy.py
@@ -93,8 +93,8 @@ def copy_archive(src_repo_path, dst_repo_path, entry):
93 child = os.fork() 93 child = os.fork()
94 if child == 0: 94 if child == 0:
95 # print('unshare/chroot', file=stderr) 95 # print('unshare/chroot', file=stderr)
96 uid_map_content = f'0 {os.getuid()} 1' 96 uid_map_content = f'0 {os.getuid()} 1\n0 0 1'
97 gid_map_content = f'0 {os.getgid()} 1' 97 gid_map_content = f'0 {os.getgid()} 1\n0 0 1'
98 unshare.unshare(unshare.CLONE_NEWNS | unshare.CLONE_NEWUSER) 98 unshare.unshare(unshare.CLONE_NEWNS | unshare.CLONE_NEWUSER)
99 with open('/proc/self/setgroups', 'w') as setgroups: 99 with open('/proc/self/setgroups', 'w') as setgroups:
100 setgroups.write('deny') 100 setgroups.write('deny')