summaryrefslogtreecommitdiff
path: root/hosts/vidhar
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-02-18 12:52:56 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-02-18 12:52:56 +0100
commitd0fbb7551f173e02b11b4964541ba7576848fc28 (patch)
treec6c8969360c96589170ce097acccca407f1e188f /hosts/vidhar
parente63528e2b62430a66e481b02a01e06e47e4a749b (diff)
downloadnixos-d0fbb7551f173e02b11b4964541ba7576848fc28.tar
nixos-d0fbb7551f173e02b11b4964541ba7576848fc28.tar.gz
nixos-d0fbb7551f173e02b11b4964541ba7576848fc28.tar.bz2
nixos-d0fbb7551f173e02b11b4964541ba7576848fc28.tar.xz
nixos-d0fbb7551f173e02b11b4964541ba7576848fc28.zip
vidhar: ...
Diffstat (limited to 'hosts/vidhar')
-rwxr-xr-xhosts/vidhar/borg/copy.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/hosts/vidhar/borg/copy.py b/hosts/vidhar/borg/copy.py
index f3827740..e6f64c95 100755
--- a/hosts/vidhar/borg/copy.py
+++ b/hosts/vidhar/borg/copy.py
@@ -46,9 +46,13 @@ halo_args = {
46borg_pwd = getpwnam('borg') 46borg_pwd = getpwnam('borg')
47 47
48def as_borg(caps=set()): 48def as_borg(caps=set()):
49 print('as_borg', 'pre-caps', file=stderr)
49 if caps: 50 if caps:
50 for capset in [cap_permitted, cap_inheritable, cap_effective, cap_ambient]: 51 cap_permitted.add(*caps)
51 capset.add(*caps) 52 cap_inheritable.add(*caps)
53 cap_effective.add(*caps)
54 cap_ambient.add(*caps)
55 print('as_borg', 'post-caps', file=stderr)
52 56
53 os.setgid(borg_pwd.pw_gid) 57 os.setgid(borg_pwd.pw_gid)
54 os.setuid(borg_pwd.pw_uid) 58 os.setuid(borg_pwd.pw_uid)