[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox-cvs
Subject:    [Bug 15371] New: env in shebang won't accept more than 1 parameter
From:       bugzilla () busybox ! net
Date:       2023-03-06 2:45:55
Message-ID: bug-15371-161 () https ! bugs ! busybox ! net/
[Download RAW message or body]

https://bugs.busybox.net/show_bug.cgi?id=15371

            Bug ID: 15371
           Summary: env in shebang won't accept more than 1 parameter
           Product: Busybox
           Version: unspecified
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: Other
          Assignee: unassigned@busybox.net
          Reporter: m95d+git@psihoexpert.ro
                CC: busybox-cvs@busybox.net
  Target Milestone: ---

Busybox v1.36.0

When script interpreter path is unknown, it is common to use env as a
"preloader" in the shebang:

#!/bin/env -S <interpreter_without_path> <parameters>

Busybox env does not support -S parameter. Without -S, tries to execute
[interpreter and it's parameters] as a single filename.
Example:

Script starts with "#!/bin/env awk -f":

execve("/usr/sbin/awk -f", ["awk -f", "/bin/ipcalc.sh"], 0xbe806d84 /* 16 vars
*/) = -1 ENOENT (No such file or directory)
execve("/usr/bin/awk -f", ["awk -f", "/bin/ipcalc.sh"], 0xbe806d84 /* 16 vars
*/) = -1 ENOENT (No such file or directory)
execve("/sbin/awk -f", ["awk -f", "/bin/ipcalc.sh"], 0xbe806d84 /* 16 vars */)
= -1 ENOENT (No such file or directory)
execve("/bin/awk -f", ["awk -f", "/bin/ipcalc.sh"], 0xbe806d84 /* 16 vars */) =
-1 ENOENT (No such file or directory)

Please add -S parameter to env.
Thank you.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
busybox-cvs mailing list
busybox-cvs@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic