summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'process.c')
-rw-r--r--process.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/process.c b/process.c
index 2525c9cd42..f598914f1a 100644
--- a/process.c
+++ b/process.c
@@ -422,10 +422,13 @@ static void
security(str)
char *str;
{
- if (rb_safe_level() > 0) {
- if (rb_env_path_tainted()) {
+ if (rb_env_path_tainted()) {
+ if (rb_safe_level() > 0) {
rb_raise(rb_eSecurityError, "Insecure PATH - %s", str);
}
+ else {
+ rb_warn("Insecure PATH - %s", str);
+ }
}
}
@@ -521,8 +524,6 @@ rb_proc_exec(str)
char *ss, *t;
char **argv, **a;
- security(str);
-
while (*str && ISSPACE(*str))
str++;