summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-02-17 15:54:13 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-02-17 15:54:13 +0100
commit9a8ad3a270a409f7c2c3522820b28e6cd29ddfba (patch)
tree0d6e1955aa408d3cba303105e9978ffb2f3317c3
parent45d411c20e662cfc1545b78227965d68c11e962e (diff)
downloadnixos-9a8ad3a270a409f7c2c3522820b28e6cd29ddfba.tar
nixos-9a8ad3a270a409f7c2c3522820b28e6cd29ddfba.tar.gz
nixos-9a8ad3a270a409f7c2c3522820b28e6cd29ddfba.tar.bz2
nixos-9a8ad3a270a409f7c2c3522820b28e6cd29ddfba.tar.xz
nixos-9a8ad3a270a409f7c2c3522820b28e6cd29ddfba.zip
vidhar: ...
-rwxr-xr-xhosts/vidhar/borg/copy.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/hosts/vidhar/borg/copy.py b/hosts/vidhar/borg/copy.py
index 1a415732..9402560c 100755
--- a/hosts/vidhar/borg/copy.py
+++ b/hosts/vidhar/borg/copy.py
@@ -96,8 +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 ps_effective = set(pyprctl.Cap.SETUID, pyprctl.Cap.SETGID) 99 ps_effective = {pyprctl.Cap.SETUID, pyprctl.Cap.SETGID}
100 ps_ambient = set(pyprctl.Cap.SYS_ADMIN) 100 ps_ambient = {pyprctl.Cap.SYS_ADMIN}
101 pyprctl.cap_permitted.add(*(ps_effective + ps_ambient)) 101 pyprctl.cap_permitted.add(*(ps_effective + ps_ambient))
102 pyprctl.cap_effective.add(*(ps_effective + ps_ambient)) 102 pyprctl.cap_effective.add(*(ps_effective + ps_ambient))
103 pyprctl.cap_inheritable.add(*ps_ambient) 103 pyprctl.cap_inheritable.add(*ps_ambient)