[tor-commits] [rbm/master] Bug 40015: Fix copying of /etc/resolv.conf when it is a symlink

boklm at torproject.org boklm at torproject.org
Wed Mar 3 17:08:22 UTC 2021


commit 8f5e0cd0f4a4467777c6a80cf0a92cec60d4c6c4
Author: Nicolas Vigier <boklm at torproject.org>
Date:   Tue Mar 2 16:12:58 2021 +0100

    Bug 40015: Fix copying of /etc/resolv.conf when it is a symlink
---
 container | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/container b/container
index 3f07f24..74e74bb 100755
--- a/container
+++ b/container
@@ -92,6 +92,8 @@ sub run_chroot {
     my ($rootfsdir, $cmd) = @_;
     create_devfiles($rootfsdir);
     do_mounts($rootfsdir);
+    # On some systems resolv.conf is a symlink (see #40015)
+    local $File::Copy::Recursive::CopyLink = 0;
     fcopy('/etc/resolv.conf', "$rootfsdir/etc/resolv.conf");
     local %ENV = ();
     system('hostname', 'rbm');



More information about the tor-commits mailing list