diff options
author | Ron Yorston <rmy@pobox.com> | 2024-08-03 10:00:59 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2024-08-03 10:00:59 +0100 |
commit | fb959dd3f29c2d0655e01147f7b0b9bb2dab4223 (patch) | |
tree | ff5f9a7a40c4fa2656c1ee2b794c877ada2904c4 /include | |
parent | dab0de7dbe833a44b3e4c20fcd0044f2d878d10d (diff) | |
download | busybox-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.h | 5 |
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); | |||
640 | int windows_env(void); | 640 | int windows_env(void); |
641 | void change_critical_error_dialogs(const char *newval) FAST_FUNC; | 641 | void change_critical_error_dialogs(const char *newval) FAST_FUNC; |
642 | char *exe_relative_path(const char *tail); | 642 | char *exe_relative_path(const char *tail); |
643 | enum { | ||
644 | ELEVATED_PRIVILEGE = 1, | ||
645 | ADMIN_ENABLED = 2 | ||
646 | }; | ||
647 | int elevation_state(void); | ||