diff options
Diffstat (limited to 'hosts')
-rwxr-xr-x | hosts/vidhar/borg/copy.py | 8 |
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 = { | |||
46 | borg_pwd = getpwnam('borg') | 46 | borg_pwd = getpwnam('borg') |
47 | 47 | ||
48 | def as_borg(caps=set()): | 48 | def 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) |