diff options
author | Ron Yorston <rmy@pobox.com> | 2023-03-16 15:21:41 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2023-03-16 15:37:15 +0000 |
commit | 87e7e7b1e61caa87112e3cf6527b606086b6b688 (patch) | |
tree | e28538e116fc02a7386720592d36ce240217b658 /win32/process.c | |
parent | 75b72cb68744a37257269ff39e30cd254f103802 (diff) | |
download | busybox-w32-87e7e7b1e61caa87112e3cf6527b606086b6b688.tar.gz busybox-w32-87e7e7b1e61caa87112e3cf6527b606086b6b688.tar.bz2 busybox-w32-87e7e7b1e61caa87112e3cf6527b606086b6b688.zip |
runuser: add 'drop' as an alias for runuser
The 'drop' alias for 'runuser' relaxes a number of constraints
that were introduced for compatibility:
- It works even if the current process doesn't have elevated
privileges.
- It isn't necessary to specify the name of the user.
- Any command can be invoked, not just the BusyBox shell.
- If the command doesn't specify a path 'drop' will first look for
a BusyBox applet then search PATH.
Adds 320-336 when built along with runuser.
(GitHub issue #240)
Diffstat (limited to 'win32/process.c')
-rw-r--r-- | win32/process.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/win32/process.c b/win32/process.c index a0678f50d..7db7741fd 100644 --- a/win32/process.c +++ b/win32/process.c | |||
@@ -204,7 +204,7 @@ quote_arg(const char *arg) | |||
204 | return q; | 204 | return q; |
205 | } | 205 | } |
206 | 206 | ||
207 | static char * | 207 | char * |
208 | find_first_executable(const char *name) | 208 | find_first_executable(const char *name) |
209 | { | 209 | { |
210 | char *tmp, *path = getenv("PATH"); | 210 | char *tmp, *path = getenv("PATH"); |