aboutsummaryrefslogtreecommitdiff
path: root/win32/mingw.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2023-03-16 15:21:41 +0000
committerRon Yorston <rmy@pobox.com>2023-03-16 15:37:15 +0000
commit87e7e7b1e61caa87112e3cf6527b606086b6b688 (patch)
treee28538e116fc02a7386720592d36ce240217b658 /win32/mingw.c
parent75b72cb68744a37257269ff39e30cd254f103802 (diff)
downloadbusybox-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/mingw.c')
-rw-r--r--win32/mingw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/win32/mingw.c b/win32/mingw.c
index 0a1af6b72..fd670ebf6 100644
--- a/win32/mingw.c
+++ b/win32/mingw.c
@@ -1136,7 +1136,7 @@ char *get_user_name(void)
1136 return user_name; 1136 return user_name;
1137} 1137}
1138 1138
1139#if ENABLE_RUNUSER 1139#if ENABLE_RUNUSER || ENABLE_DROP
1140/* 1140/*
1141 * When runuser drops privileges TokenIsElevated still returns TRUE. 1141 * When runuser drops privileges TokenIsElevated still returns TRUE.
1142 * Use other means to determine if we're actually unprivileged. 1142 * Use other means to determine if we're actually unprivileged.