Re: shebanged script not executed right - wth
Date: Sat, 09 Aug 2025 13:23:39 UTC
On Sat, Aug 9, 2025 at 9:05 AM Dag-Erling Smørgrav <des@freebsd.org> wrote: > > I found the place in the code that prevents double indirection, in > sys/kern/imgact_shell.c: > > /* > * Don't allow a shell script to be the shell for a shell > * script. :-) > */ > if (imgp->interpreted & IMGACT_SHELL) > return (ENOEXEC); > > We could remove this with no ill effects, but I'm not sure we want to. Loop detection? Privilege escalation prevention? I might be entirely wrong, but the potential hazards seem to outweigh any possibly benefit.