summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-02-17 14:12:34 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-02-17 14:12:34 +0100
commit884c1ddb26e9392aeaeefe02949f436b1d52aa1d (patch)
tree4be11f334d4994623dc925c634ce3eed776a3e19
parent37413c78836fb3892fcb7f856ec3a04cea345c75 (diff)
downloadnixos-884c1ddb26e9392aeaeefe02949f436b1d52aa1d.tar
nixos-884c1ddb26e9392aeaeefe02949f436b1d52aa1d.tar.gz
nixos-884c1ddb26e9392aeaeefe02949f436b1d52aa1d.tar.bz2
nixos-884c1ddb26e9392aeaeefe02949f436b1d52aa1d.tar.xz
nixos-884c1ddb26e9392aeaeefe02949f436b1d52aa1d.zip
vidhar: ...
-rwxr-xr-xhosts/vidhar/borg/copy.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/hosts/vidhar/borg/copy.py b/hosts/vidhar/borg/copy.py
index 9dac86ae..9b263288 100755
--- a/hosts/vidhar/borg/copy.py
+++ b/hosts/vidhar/borg/copy.py
@@ -102,7 +102,8 @@ def copy_archive(src_repo_path, dst_repo_path, entry):
102 uid_map.write(f'0 {uid} 1') 102 uid_map.write(f'0 {uid} 1')
103 with open('/proc/self/gid_map', 'w') as gid_map: 103 with open('/proc/self/gid_map', 'w') as gid_map:
104 gid_map.write(f'0 {gid} 1') 104 gid_map.write(f'0 {gid} 1')
105 pyprctl.cap_ambient_raise(pyprctl.Cap.SYS_ADMIN) 105 pyprctl.cap_permitted.sys_admin = True
106 pyprctl.cap_ambient.sys_admin = True
106 with open('/proc/self/uid_map', 'w') as uid_map: 107 with open('/proc/self/uid_map', 'w') as uid_map:
107 uid_map.write(f'{uid} {uid} 1') 108 uid_map.write(f'{uid} {uid} 1')
108 with open('/proc/self/gid_map', 'w') as gid_map: 109 with open('/proc/self/gid_map', 'w') as gid_map: