projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c2e452
)
Run external commands only with localized sanitized $ENV{PATH}.
author
Jarkko Hietaniemi
<jhi@iki.fi>
Sun, 25 May 2003 18:51:00 +0000
(18:51 +0000)
committer
Jarkko Hietaniemi
<jhi@iki.fi>
Sun, 25 May 2003 18:51:00 +0000
(18:51 +0000)
p4raw-id: //depot/perl@19621
ext/Sys/Hostname/Hostname.pm
patch
|
blob
|
history
diff --git
a/ext/Sys/Hostname/Hostname.pm
b/ext/Sys/Hostname/Hostname.pm
index
efc8d38
..
632ea9b
100644
(file)
--- a/
ext/Sys/Hostname/Hostname.pm
+++ b/
ext/Sys/Hostname/Hostname.pm
@@
-72,6
+72,8
@@
sub hostname {
else { # Unix
# is anyone going to make it here?
+ local $ENV{PATH} = '/usr/bin:/bin:/usr/sbin:/sbin'; # Paranoia.
+
# method 2 - syscall is preferred since it avoids tainting problems
# XXX: is it such a good idea to return hostname untainted?
eval {