Allow the #! command line to be up to PAGE_SIZE long, rather then
authorMatthew Dillon <dillon@dragonflybsd.org>
Mon, 28 Feb 2005 05:44:52 +0000 (05:44 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Mon, 28 Feb 2005 05:44:52 +0000 (05:44 +0000)
commitf96efb2df378aea66d5e18f5adc1f9e0b47615d0
tree09ff3a9a869e290bc4cb644aeaf16a2ace3b34ca
parentdfe04a30352d6daa9195c765fddef1e8a1cb4ea7
Allow the #! command line to be up to PAGE_SIZE long, rather then
artificially limiting it to MAXSHELLCMDLEN.  The interpreter name is
still limited to MAXSHELLCMDLEN.

A \0 is now considered a line terminator.

Correctly report the ENAMETOOLONG case.

Note that FreeBSD (and hence DragonFly) break the #! line into multiple
argv arguments, which is not what any other UNIX does.  This is likely going
to be changed in the future but not as of this commit.

Inspired-by: Maxim Sobolev <sobomax@FreeBSD.org> / similar FreeBSD work,
and Garance A Drosihn <drosih@rpi.edu>
sys/kern/imgact_shell.c