summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-02-17 15:42:35 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-02-17 15:42:35 +0100
commit0958e8f170b6e1d369d3036c1b5390ec6fcd0ae9 (patch)
treee4290fd0c4defd3133d296cba026ed2f65b768d0
parent1303f869eb553749cb233beb4955adfc700175fa (diff)
downloadnixos-0958e8f170b6e1d369d3036c1b5390ec6fcd0ae9.tar
nixos-0958e8f170b6e1d369d3036c1b5390ec6fcd0ae9.tar.gz
nixos-0958e8f170b6e1d369d3036c1b5390ec6fcd0ae9.tar.bz2
nixos-0958e8f170b6e1d369d3036c1b5390ec6fcd0ae9.tar.xz
nixos-0958e8f170b6e1d369d3036c1b5390ec6fcd0ae9.zip
vidhar: ...
-rwxr-xr-xhosts/vidhar/borg/copy.py2
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: