Hi all,
This update to the patchset contains the following changes:
1. Re-implemented BB_EXECVE and BB_EXECVPE to use utility functions
like BB_APPLET_EXECVE and BB_APPLET_EXECVPE.
2. Introduced BB_APPLET_EXECVE, which copies argv to a new heap
allocated string array. This allows applets to modify
Having FEATURE_PREFER_APPLETS on while building individual
applets seems like a bad idea.
Applets would try to execute theirselves with different
argument if applets are prefered.
Signed-off-by: Nadav Tasher
---
Config.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/Config.in b/Config.in
This change makes the standalone shell use the BB_EXECVE utility.
BB_EXECVE calls BB_APPLET_EXECVE which has NOEXEC and applets only logic.
This allows for better control of the executed processes.
Signed-off-by: Nadav Tasher
---
shell/ash.c | 72 +++-
Due to a limit imposed by FEATURE_FORCE_APPLETS, execv is not allowed.
The execv call is required to execute CGI binaries, so it makes
FEATURE_HTTPD_CGI depend on FEATURE_FORCE_APPLET being disabled.
The execv call was changed to BB_EXECV, mostly for keeping the
codebase consistent, as all applets
This replaces all invocations of execs with BB_EXECVP(E).
It provides better control over executed programs and allows
all applets to seamlessly execute other applets instead of
just calling exec.
Signed-off-by: Nadav Tasher
---
console-tools/reset.c | 2 +-
debianutils/start_stop_dae
This patch aims to provide suitable proxy functions to the
exec syscall family.
BB_EXECVE and BB_EXECVPE were introduced, acting as a proxies to
the libc execve and execvpe functions.
When called, they first use BB_APPLET_EXECVE and BB_APPLET_EXECVPE
to look for a matching applet (assuming FEATURE
Using BB_EXECVP ensures consistency with spawn() function,
and allows moving NOEXEC support to BB_EXECVP, which makes
BB_EXECVP to go-to function for running new processes.
Signed-off-by: Nadav Tasher
---
libbb/vfork_daemon_rexec.c | 25 +
1 file changed, 13 insertions(+)
Implemented bb_system using spawn_and_wait in conjuction with "sh",
to allow bb_system to execute the internal shell when using the
FEATURE_PREFER_APPLETS config option.
When FEATURE_PREFER_APPLETS is disabled, libc "system()" is used.
Signed-off-by: Nadav Tasher
---
include/libbb.h
Using BB_EXECVP allows for more control over the compressor
program executed.
The xz compressor is disabled when applets are prefered,
since the xz applet does not support compression.
Signed-off-by: Nadav Tasher
---
archival/tar.c | 28 +++-
1 file changed, 23 insertion
This patch adds an experimental configuration option to allow the
BB_EXECVPE function to treat all applets as if they were NOEXEC.
This is experimental, as noted in the configuration description.
Signed-off-by: Nadav Tasher
---
Config.in | 12
libbb/executable.c | 2 +-
2
Allows for execution of the internal shell when the
FEATURE_PREFER_APPLETS configuration option is enabled..
Signed-off-by: Nadav Tasher
---
archival/dpkg.c | 2 +-
editors/awk.c | 2 +-
editors/vi.c | 2 +-
init/bootchartd.c | 2 +-
miscutils/man.c | 2 +-
netwo
On Sat, Feb 01, 2025 at 11:14:55AM +, Ron Yorston wrote:
> Differences between how ash searches for an executable and how this
> patch set using execvpe() does:
>
> 1) execvpe() uses the environment variable PATH while ash uses the shell
>variable PATH. These may not be the same.
>
> 2)
Hi Anton,
Thanks for the patch.
> Report of the static analyzer:
> DIVISION_BY_ZERO.EX Variable xatou(...),
> whose possible value set allows a zero value at xatonum_template.c:118 by
> calling function 'xatou' at beep.c:90,
> is used as a denominator at beep.c:90.
>
> Corrections explained:
> -
On Sat, 8 Feb 2025 18:26:12 +0100
Xabier Oneca -- xOneca wrote:
> Hi Anton,
>
> Thanks for the patch.
>
> > Report of the static analyzer:
> > DIVISION_BY_ZERO.EX Variable xatou(...),
> > whose possible value set allows a zero value at xatonum_template.c:118 by
> > calling function 'xatou' a
14 matches
Mail list logo