summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-02-17 14:02:22 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-02-17 14:02:22 +0100
commit52f60bc7653196dd05a1e9e457ee1e3b24428eda (patch)
tree84d185224e9d4d42e681d4b585e09d448ed6d297
parent0a98d0aaa5c41ed37e9db183e7a5c26e0290ec08 (diff)
downloadnixos-52f60bc7653196dd05a1e9e457ee1e3b24428eda.tar
nixos-52f60bc7653196dd05a1e9e457ee1e3b24428eda.tar.gz
nixos-52f60bc7653196dd05a1e9e457ee1e3b24428eda.tar.bz2
nixos-52f60bc7653196dd05a1e9e457ee1e3b24428eda.tar.xz
nixos-52f60bc7653196dd05a1e9e457ee1e3b24428eda.zip
vidhar: ...
-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')