Lines Matching refs:perl

0 /*    perl.c
17 * Be proud that perl(1) may proclaim:
21 * The flow was: perl starts, notices script is suid, execs suidperl with same
23 * right UID, execs perl with similar arguments but with script pre-opened on
24 * /dev/fd/xxx; perl checks script is as should be and does work. This was
27 * The "correct" flow should be: perl starts, opens script and notices it is
31 * perl with same arguments; perl checks many things and does work.
33 * (Opening the script in perl instead of suidperl, we "lose" scripts that
37 * For now, suidperl and perl are pretty much the same large and cumbersome
42 * http://bugs.perl.org/index.html?req=bug_id&bug_id=20010322.218
43 * http://rt.perl.org/rt2/Ticket/Display.html?id=6511
52 * http://www.mail-archive.com/perl5-porters@perl.org/msg71953.html
53 * http://www.mail-archive.com/perl5-porters@perl.org/msg75245.html
54 * http://www.mail-archive.com/perl5-porters@perl.org/msg75563.html
55 * http://www.mail-archive.com/perl5-porters@perl.org/msg75635.html
76 #include "perl.h"
1123 setuid perl scripts securely.\n");
1128 /* [perl #22371] Algorimic Complexity Attack on Perl 5.6.1, 5.8.0
2486 "-v print version, subversion (includes VERY IMPORTANT perl info)",
2490 "-x[directory] strip off text before #!perl line and perhaps cd to directory",
2643 "Recompile perl with -DDEBUGGING to use -D switch\n");
2795 Perl_form(aTHX_ "\nThis is perl, v%"VDf" built for %s",
2798 /* Adjust verbose output as in the perl that ships with the DG/UX OS from EMC */
2800 Perl_form(aTHX_ "\nThis is perl, version %vd\n", PL_patchlevel));
2813 "see perl -V for more detail)",
2888 this system using `man perl' or `perldoc perl'. If you have access to the\n\
2889 Internet, point your browser at http://www.perl.com/, the Perl Home Page.\n\n");
2952 sv_catpv(prog, "/perl");
3055 char *perl;
3077 * perl <( echo '#!perl -DA'; echo 'print "$0\n"')
3117 "change a #! line\nfrom sperl to perl?\n");
3123 * perl with that fd as it has always done.
3163 perl = os2_execname(aTHX);
3165 perl = PL_origargv[0];
3176 code = "(1../^#!.*perl/i)|/^\\s*#(?!\\s*((ifn?|un)def|(el|end)?if|define|include|else|error|pragma)\\b)/||!($|=1)||print";
3182 perl, quote, code, quote, scriptname, cpp,
3210 Perl_croak(aTHX_ "Can't open perl script \"%s\": %s\n",
3361 * in perl will not fix that problem, but if you have disabled setuid
3364 * root version must be called suidperl or sperlN.NNN. If regular perl
3368 * uid. We don't just make perl setuid root because that loses the
3369 * effective uid we had before invoking perl, if it was different from the
3376 * making perl setuid would be a huge security risk (and yes, that
3379 * DOSUID must be defined in both perl and suidperl, and IAMSUID must
3397 * Since the script is opened by perl, not suidperl, some of these
3436 * As the script is opened by perl, not suidperl, we do not need to
3504 if ( (s2-4 < SvPV(PL_linestr,n_a)+2 || strnNE(s2-4,"perl",4)) &&
3505 (s-9 < SvPV(PL_linestr,n_a)+2 || strnNE(s-9,"perl",4)) )
3506 Perl_croak(aTHX_ "Not a perl script");
3522 * so may be checked and trapped in perl. But, security checks must
3523 * be done in suidperl and not deferred to perl. Note that suidperl
3525 * the #! line (but execs perl sooner).
3546 PL_euid) { /* oops, we're not the setuid root perl */
3549 * steps of execing sperl and then perl with fd scripts, but
3550 * simply set up UIDs within the same perl invocation; so do
3566 * Pass script name as "subdir" of fd, which perl will grok;
3675 /* exec the real perl, substituting fd script for scriptname. */
3676 /* (We pass script name as "subdir" of fd, which perl will grok.) */
3680 * go on to "do the perl thing".
3687 * We need suidperl to do the exact same argument checking that perl
3690 * binary as perl (but they are not identical). - Maybe could defer that
3691 * check to the invoked perl, and suidperl be a tiny wrapper instead;
3693 * would make suidperl security rely on perl, a design no-no.
3701 * never to do any real perl. Maybe we should put
3703 * Perl_croak(aTHX_ "Suidperl should never do real perl\n");
3723 PerlProc_execv(Perl_form(aTHX_ "%s/perl"PERL_FS_VER_FMT, BIN_EXP,
3727 Perl_croak(aTHX_ "Can't do setuid (suidperl cannot exec perl)\n");
3782 if (*s == '#' && s[1] == '!' && ((s = instr(s,"perl")) || (s = instr(s2,"PERL")))) {
3790 if (strnEQ(s2-4,"perl",4))
3796 /* We are always searching for the #!perl line in MacPerl,
3886 * perl -e 'print "Hello\n"'
4280 # define PRIVLIB_EXP "/usr/local/lib/perl5:/usr/local/lib/perl"