From 52f60bc7653196dd05a1e9e457ee1e3b24428eda Mon Sep 17 00:00:00 2001
From: Gregor Kleen <gkleen@yggdrasil.li>
Date: Thu, 17 Feb 2022 14:02:22 +0100
Subject: vidhar: ...

---
 hosts/vidhar/borg/copy.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'hosts/vidhar/borg')

diff --git a/hosts/vidhar/borg/copy.py b/hosts/vidhar/borg/copy.py
index 64ae0a71..4bfae1cb 100755
--- a/hosts/vidhar/borg/copy.py
+++ b/hosts/vidhar/borg/copy.py
@@ -93,8 +93,8 @@ def copy_archive(src_repo_path, dst_repo_path, entry):
         child = os.fork()
         if child == 0:
             # print('unshare/chroot', file=stderr)
-            uid_map_content = f'0 {os.getuid()} 1'
-            gid_map_content = f'0 {os.getgid()} 1'
+            uid_map_content = f'0 {os.getuid()} 1\n0 0 1'
+            gid_map_content = f'0 {os.getgid()} 1\n0 0 1'
             unshare.unshare(unshare.CLONE_NEWNS | unshare.CLONE_NEWUSER)
             with open('/proc/self/setgroups', 'w') as setgroups:
                 setgroups.write('deny')
-- 
cgit v1.2.3