Re: [patch] 2.3.24: binfmt_script.c should support DOS end of lines

Simon Kirby (sim@stormix.com)
Tue, 16 Nov 1999 00:39:54 -0500


On Mon, Nov 15, 1999 at 04:56:13PM -0800, Daniel Sears wrote:

> This is a one line patch for 2.3.24.
> binfmt_script.c doesn't handle DOS
> \r\n end of lines. Perl, for example,
> supports DOS formatted scripts.
>
> Chris Sears
> dbsears@ix.netcom.com
>
>
> --- binfmt_script.c~ Sun Nov 14 11:04:09 1999
> +++ binfmt_script.c Sun Nov 14 11:09:58 1999
> @@ -31,7 +31,7 @@
> bprm->dentry = NULL;
>
> bprm->buf[127] = '\0';
> - if ((cp = strchr(bprm->buf, '\n')) == NULL)
> + if ((cp = strpbrk(bprm->buf, "\n\r")) == NULL)
> cp = bprm->buf+127;
> *cp = '\0';
> while (cp > bprm->buf) {

We cured this with some symlinks on our webservers, but I guess this
isn't too messy. :)

Simon-

[ Stormix Technologies Inc. ][ NetNation Communcations Inc. ]
[ sim@stormix.com ][ sim@netnation.com ]
[ Opinions expressed are not necessarily those of my employers. ]

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/