diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2022-02-17 15:42:35 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2022-02-17 15:42:35 +0100 |
commit | 0958e8f170b6e1d369d3036c1b5390ec6fcd0ae9 (patch) | |
tree | e4290fd0c4defd3133d296cba026ed2f65b768d0 /hosts/vidhar | |
parent | 1303f869eb553749cb233beb4955adfc700175fa (diff) | |
download | nixos-0958e8f170b6e1d369d3036c1b5390ec6fcd0ae9.tar nixos-0958e8f170b6e1d369d3036c1b5390ec6fcd0ae9.tar.gz nixos-0958e8f170b6e1d369d3036c1b5390ec6fcd0ae9.tar.bz2 nixos-0958e8f170b6e1d369d3036c1b5390ec6fcd0ae9.tar.xz nixos-0958e8f170b6e1d369d3036c1b5390ec6fcd0ae9.zip |
vidhar: ...
Diffstat (limited to 'hosts/vidhar')
-rwxr-xr-x | hosts/vidhar/borg/copy.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hosts/vidhar/borg/copy.py b/hosts/vidhar/borg/copy.py index 8eea7794..ab5e027d 100755 --- a/hosts/vidhar/borg/copy.py +++ b/hosts/vidhar/borg/copy.py | |||
@@ -96,6 +96,8 @@ def copy_archive(src_repo_path, dst_repo_path, entry): | |||
96 | # print('unshare/chroot', file=stderr) | 96 | # print('unshare/chroot', file=stderr) |
97 | uid, gid = os.getuid(), os.getgid() | 97 | uid, gid = os.getuid(), os.getgid() |
98 | unshare.unshare(unshare.CLONE_NEWNS | unshare.CLONE_NEWUSER) | 98 | unshare.unshare(unshare.CLONE_NEWNS | unshare.CLONE_NEWUSER) |
99 | with open('/proc/self/uid_map', 'r') as uid_map: | ||
100 | print(uid_map.read(), file=stderr) | ||
99 | with open('/proc/self/setgroups', 'w') as setgroups: | 101 | with open('/proc/self/setgroups', 'w') as setgroups: |
100 | setgroups.write('deny') | 102 | setgroups.write('deny') |
101 | with open('/proc/self/uid_map', 'w') as uid_map: | 103 | with open('/proc/self/uid_map', 'w') as uid_map: |