[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit 8f5e0cd0f4a4467777c6a80cf0a92cec60d4c6c4
Author: Nicolas Vigier <boklm@xxxxxxxxxxxxxx>
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');

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits