Re: Bug in #! processing - "pear broken on current"

From: Garance A Drosehn (gad_at_FreeBSD.org)
Date: 06/09/05

  • Next message: Bruce Evans: "Re: Retiring static libpam support"
    Date: Thu, 9 Jun 2005 12:37:20 -0400
    To: "Matthew D. Fuller" <fullermd@over-yonder.net>
    
    

    [moved over from the thread:
            Re: cvs commit: src/sys/kern imgact_shell.c
    on the cvs-src mailing list...]

    At 11:03 AM -0500 6/9/05, Matthew D. Fuller wrote:
    >On Thu, Jun 09, 2005 at 12:00:17PM -0400 I heard the voice of
    >Garance A Drosehn, and lo! it spake thus:
    > > Matthew wrote:
    > > ] See also the "pear broken on current" thread on -current
    > > ] and -ports around last weekend. Of course, I don't know
    > > ] if pear is wrong in what it's trying to do, but the change
    > > ] does appear to throw it off.
    > >
    > > I'm also willing to write some more changes to sh/options.c, if
    > > that is the best place to fix the problems that these ports are
    > > running into.
    >
    >Well, I dunno what part of it is giving troubles (and I haven't seen
    >it myself, since I'm still on RELENG_5 for the moment; just keeping my
    >eyes open). It doesn't seem like a terribly esoteric line though:
    >
    >#!/usr/local/bin/php -n -q -dsafe_mode=0 -doutput_buffering=1

    It is very likely that the problem which is being seen with this
    script is due to the change in parsing I committed on May 28th.
    Before the change, php would have been started up with:

                [0] -> /usr/local/bin/php
                [1] -> -n
                [2] -> -q
                [3] -> -dsafe_mode=0
                [4] -> -doutput_buffering=1
                [5] -> /usr/local/bin/name-of-script
             [6...] -> parameters specified by user

    and now php is being started with:

                [0] -> /usr/local/bin/php
                [1] -> -n -q -dsafe_mode=0 -doutput_buffering=1
                [2] -> /usr/local/bin/name-of-script
             [3...] -> parameters specified by user

    Assuming 'php' does not know what to do when all those options are
    glommed together in a single argument, then the above script would
    not work right on any other operating systems either. The change
    I made on the 28th gets FreeBSD to work more like other OS's when
    it comes to parsing that #!-line in scripts.

    Changes to /bin/sh would not fix this, because /bin/sh is not
    involved in this situation. But the change I'm thinking of for
    /usr/bin/env could be used to fix this, once I write up that change...

    -- 
    Garance Alistair Drosehn     =      gad@gilead.netel.rpi.edu
    Senior Systems Programmer               or   gad@FreeBSD.org
    Rensselaer Polytechnic Institute;             Troy, NY;  USA
    _______________________________________________
    freebsd-arch@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-arch
    To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
    

  • Next message: Bruce Evans: "Re: Retiring static libpam support"

    Relevant Pages

    • Re: variable problem in address book script
      ... fix old stuff. ... I really don't know anything about PHP except what I picked up over the past ... I found another address book script that pretty much worked out of the box. ... A couple error messages that were fixed with your suggestions for the ...
      (alt.php)
    • Re: [PHP] Posting Summary for Week Ending 11 January, 2008: php-general@lists.php.net
      ... that was something that I forgot to fix in the blast that ... the script sent out (due to a problem between the chair and the ... I hadn't realized that Stas had one (or that PHP had one at all, ...
      (php.general)
    • Re: [PHP] php 5 and register_globals=off gives lotsa errors
      ... Or you could fix the script: ... server with php 4 and register_globals turned on, ... Notice: Undefined index: action in ... But what I really want to know is: How do I fix it without trying to ...
      (php.general)
    • Re: register_globals
      ... This script is part of a big website that already running and I only want to keep it working ... You didn't say which version of PHP you're running, but turning it on in the php.ini file should work - unless it's overridden, as Miguel indicated. ... However - you NEED to fix your code so that it doesn't require register_globals to be on. ... It's a huge security hole, and may be completely disabled in future versions of PHP. ...
      (comp.lang.php)
    • lk-changelog.pl 0.167
      ... This script is used by Linus and Marcelo to rearrange and reformat BK ... fix obfuscation of unknown addresses in terse/oneline modes ... Bryan O'Sullivan's address got hosed. ... $indent is auto-generated from $indent1. ...
      (Linux-Kernel)

  • Quantcast