diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2022-02-17 14:02:22 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2022-02-17 14:02:22 +0100 |
commit | 52f60bc7653196dd05a1e9e457ee1e3b24428eda (patch) | |
tree | 84d185224e9d4d42e681d4b585e09d448ed6d297 /hosts | |
parent | 0a98d0aaa5c41ed37e9db183e7a5c26e0290ec08 (diff) | |
download | nixos-52f60bc7653196dd05a1e9e457ee1e3b24428eda.tar nixos-52f60bc7653196dd05a1e9e457ee1e3b24428eda.tar.gz nixos-52f60bc7653196dd05a1e9e457ee1e3b24428eda.tar.bz2 nixos-52f60bc7653196dd05a1e9e457ee1e3b24428eda.tar.xz nixos-52f60bc7653196dd05a1e9e457ee1e3b24428eda.zip |
vidhar: ...
Diffstat (limited to 'hosts')
-rwxr-xr-x | hosts/vidhar/borg/copy.py | 4 |
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') |