aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2023-03-13 10:25:56 +0000
committerRon Yorston <rmy@pobox.com>2023-03-13 10:25:56 +0000
commit385decd6bf62c116565ece1e0992ff7a79d48474 (patch)
tree30065938d54231dcadf54cc3e22206f4985a7180 /include
parent6eeb5240974bb304830319e9fa5afbc4d6194fc0 (diff)
downloadbusybox-w32-385decd6bf62c116565ece1e0992ff7a79d48474.tar.gz
busybox-w32-385decd6bf62c116565ece1e0992ff7a79d48474.tar.bz2
busybox-w32-385decd6bf62c116565ece1e0992ff7a79d48474.zip
runuser: new applet
Add a cut down, Windows-specific implementation of `runuser` from util-linux. This allows elevated privileges to be dropped when running in an SSH session. It also works when using `su` or starting busybox-w32 'as administrator'. There are complications: - The method used to drop privileges leaves the access token in the TokenIsElevated state. Detecting this is likely to be fragile. - The unprivileged shell is started by CreateProcessAsUserA(). In older versions of Windows this has to be loaded dynamically. Adds about 900 bytes. (GitHub issue #240)
Diffstat (limited to 'include')
-rw-r--r--include/mingw.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/mingw.h b/include/mingw.h
index b5b2fe169..e49483307 100644
--- a/include/mingw.h
+++ b/include/mingw.h
@@ -590,3 +590,5 @@ int has_path(const char *file);
590int is_relative_path(const char *path); 590int is_relative_path(const char *path);
591char *get_last_slash(const char *path); 591char *get_last_slash(const char *path);
592const char *applet_to_exe(const char *name); 592const char *applet_to_exe(const char *name);
593char *get_user_name(void);
594char *quote_arg(const char *arg);