diff options
author | Nicholas Clark <nick@ccl4.org> | 2006-02-03 22:18:45 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-02-03 22:18:45 +0000 |
commit | a8e48fe22d03f17d66e4765e2eef8807740ca1fc (patch) | |
tree | 896524b21e572c0f5c2061b95f1136b61ba9de4f /perl.c | |
parent | a52eba0e56037d7ca4b25de9aedb922d4515614d (diff) | |
download | perl-a8e48fe22d03f17d66e4765e2eef8807740ca1fc.tar.gz |
The MSDOS-only call to moreswitches will never reach forbid_setid, so
it can have a parameter of -1 without changing any behaviour.
I see no reason to forbid "command line" switches when they are
actually coming from the #! line of the script itself (as read by perl)
as they must have been written by the owner of the script, rather than
being crafted by the user manipulating the command line, and therefore
cannot be subverted. (Or alternatively, can be subverted as easily as
the rest of the script, and we're permitting *that* to be run)
p4raw-id: //depot/perl@27074
Diffstat (limited to 'perl.c')
-rw-r--r-- | perl.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2009,7 +2009,7 @@ S_parse_body(pTHX_ char **env, XSINIT_t xsinit) else if (scriptname == NULL) { #ifdef MSDOS if ( PerlLIO_isatty(PerlIO_fileno(PerlIO_stdin())) ) - moreswitches("h", suidscript); + moreswitches("h", -1); #endif scriptname = "-"; } @@ -4265,7 +4265,7 @@ S_find_beginning(pTHX_ const int suidscript) while (isDIGIT(s2[-1]) || s2[-1] == '-' || s2[-1] == '.' || s2[-1] == '_') s2--; if (strnEQ(s2-4,"perl",4)) - while ((s = moreswitches(s, suidscript))) + while ((s = moreswitches(s, -1))) ; } #ifdef MACOS_TRADITIONAL |