Package: needrestart / 3.4-5~bpo9+1

06-stretch-glibc-cant-cd.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Fix crashes with glibc < 2.2.28 on Stretch.
# URL: https://github.com/liske/needrestart/pull/125#issuecomment-448111336

diff -Naur needrestart-3.4.orig/perl/lib/NeedRestart/Interp/Perl.pm needrestart-3.4/perl/lib/NeedRestart/Interp/Perl.pm
--- needrestart-3.4.orig/perl/lib/NeedRestart/Interp/Perl.pm	2019-05-29 09:29:32.000000000 +0200
+++ needrestart-3.4/perl/lib/NeedRestart/Interp/Perl.pm	2019-05-29 09:30:45.602084238 +0200
@@ -57,7 +57,7 @@
 	return undef;
     }
     my $cwd = getcwd();
-    chdir("/proc/$pid/root/$ptable->{cwd}");
+	chdir(readlink("/proc/$pid/root") . "/$ptable->{cwd}");
 
     # skip the process if the cwd is unreachable (i.e. due to mnt ns)
     unless(getcwd()) {
@@ -111,7 +111,7 @@
 	return ();
     }
     my $cwd = getcwd();
-    chdir("/proc/$pid/root/$ptable->{cwd}");
+	chdir(readlink("/proc/$pid/root") . "/$ptable->{cwd}");
 
     # skip the process if the cwd is unreachable (i.e. due to mnt ns)
     unless(getcwd()) {