aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2024-08-03 10:00:59 +0100
committerRon Yorston <rmy@pobox.com>2024-08-03 10:00:59 +0100
commitfb959dd3f29c2d0655e01147f7b0b9bb2dab4223 (patch)
treeff5f9a7a40c4fa2656c1ee2b794c877ada2904c4 /include
parentdab0de7dbe833a44b3e4c20fcd0044f2d878d10d (diff)
downloadbusybox-w32-fb959dd3f29c2d0655e01147f7b0b9bb2dab4223.tar.gz
busybox-w32-fb959dd3f29c2d0655e01147f7b0b9bb2dab4223.tar.bz2
busybox-w32-fb959dd3f29c2d0655e01147f7b0b9bb2dab4223.zip
su: detect inability to raise privilege
When privilege has been dropped by the 'drop' applet, the 'su' applet is unable to raise it again because ShellExecuteEx() thinks it unnecessary. Detect this situation, report an error and return exit code 2. Costs 72-112 bytes. (GitHub issue #437)
Diffstat (limited to 'include')
-rw-r--r--include/mingw.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/mingw.h b/include/mingw.h
index c4c2e199a..7a07de619 100644
--- a/include/mingw.h
+++ b/include/mingw.h
@@ -640,3 +640,8 @@ char *xappendword(const char *str, const char *word);
640int windows_env(void); 640int windows_env(void);
641void change_critical_error_dialogs(const char *newval) FAST_FUNC; 641void change_critical_error_dialogs(const char *newval) FAST_FUNC;
642char *exe_relative_path(const char *tail); 642char *exe_relative_path(const char *tail);
643enum {
644 ELEVATED_PRIVILEGE = 1,
645 ADMIN_ENABLED = 2
646};
647int elevation_state(void);