From 884c1ddb26e9392aeaeefe02949f436b1d52aa1d Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 17 Feb 2022 14:12:34 +0100 Subject: vidhar: ... --- hosts/vidhar/borg/copy.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'hosts/vidhar') 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): uid_map.write(f'0 {uid} 1') with open('/proc/self/gid_map', 'w') as gid_map: gid_map.write(f'0 {gid} 1') - pyprctl.cap_ambient_raise(pyprctl.Cap.SYS_ADMIN) + pyprctl.cap_permitted.sys_admin = True + pyprctl.cap_ambient.sys_admin = True with open('/proc/self/uid_map', 'w') as uid_map: uid_map.write(f'{uid} {uid} 1') with open('/proc/self/gid_map', 'w') as gid_map: -- cgit v1.2.3