Date: Sun, 31 Oct 2004 12:25:17 +0100 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: freebsd-current@freebsd.org Subject: No more comments in interpreter specification line! Message-ID: <20041031112517.GE8120@darkness.comp.waw.pl>
index | next in thread | raw e-mail
[-- Attachment #1 --] Hi. I just backed out revision 1.21 of imgact_shell.c. As mentioned in commit log, no other operating system has this magic. I'm also going to MFC it to RELENG_5. Under really big claims, we can consider MFCing this fix: http://people.freebsd.org/~pjd/patches/shell2.patch which adds backward compatibility for this "feature", but it's ugly and I'll be glad if we can avoid this. The commit: pjd 2004-10-31 11:12:59 UTC FreeBSD src repository Modified files: sys/kern imgact_shell.c Log: Don't treat # as a comment in interpreter specification line. This is magic and no other operating system do so (i.e. Solaris, Tru64, Linux, AIX, HP-UX, Irix, MacOS X, NetBSD). Discussed on: current@ Reported by: Sławek Żak <zaks@prioris.mini.pw.edu.pl> Revision Changes Path 1.27 +1 -1 src/sys/kern/imgact_shell.c http://cvsweb.FreeBSD.org/src/sys/kern/imgact_shell.c.diff?r1=1.26&r2=1.27 =================================================================== RCS file: /usr/local/www/cvsroot/FreeBSD/src/sys/kern/imgact_shell.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -p -r1.26 -r1.27 --- src/sys/kern/imgact_shell.c 2003/06/11 00:56:54 1.26 +++ src/sys/kern/imgact_shell.c 2004/10/31 11:12:59 1.27 @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/kern/imgact_shell.c,v 1.26 2003/06/11 00:56:54 obrien Exp $"); +__FBSDID("$FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/kern/imgact_shell.c,v 1.27 2004/10/31 11:12:59 pjd Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -73,7 +73,7 @@ exec_shell_imgact(imgp) /* * Find end of line; return if the line > MAXSHELLCMDLEN long. */ - for (ihp = &image_header[2]; *ihp != '\n' && *ihp != '#'; ++ihp) { + for (ihp = &image_header[2]; *ihp != '\n'; ++ihp) { if (ihp >= &image_header[MAXSHELLCMDLEN]) return(ENAMETOOLONG); } -- Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBhMudForvXbEpPzQRAu59AJ44hDe9x/CAQyVi50n83Jwz5qeiAQCgmPC3 FPErsQUTGsBJhbdaxWONaLI= =cuPd -----END PGP SIGNATURE-----help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041031112517.GE8120>
