summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsommerfe <none@none>2006-04-07 14:39:22 -0700
committersommerfe <none@none>2006-04-07 14:39:22 -0700
commit918fadfadf0c235e6c65ca652caab042b6f05976 (patch)
treeda908284b44b85115a12597837c3efb2be3b16e3
parent10db1377dafab8ba3feedef26db9c5d8539a5cd1 (diff)
downloadillumos-gate-918fadfadf0c235e6c65ca652caab042b6f05976.tar.gz
6410293 check_rtime should unset LD_PRELOAD* variables
-rw-r--r--usr/src/tools/scripts/check_rtime.pl9
1 files changed, 9 insertions, 0 deletions
diff --git a/usr/src/tools/scripts/check_rtime.pl b/usr/src/tools/scripts/check_rtime.pl
index e39b453fa6..fb039d381f 100644
--- a/usr/src/tools/scripts/check_rtime.pl
+++ b/usr/src/tools/scripts/check_rtime.pl
@@ -258,6 +258,15 @@ sub cmp_os_ver {
return (eval "$diff $op 0" ? 1 : 0);
}
+# This script relies on ldd returning output reflecting only the binary
+# contents. But if LD_PRELOAD* environment variables are present, libraries
+# named by them will also appear in the output, disrupting our analysis.
+# So, before we get too far, scrub the environment.
+
+delete($ENV{LD_PRELOAD});
+delete($ENV{LD_PRELOAD_32});
+delete($ENV{LD_PRELOAD_64});
+
# Establish a program name for any error diagnostics.
chomp($Prog = `basename $0`);