diff options
author | Ron Yorston <rmy@pobox.com> | 2019-03-10 09:58:13 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2019-03-10 13:04:55 +0000 |
commit | b04bbc0109046ee69806a472fd7e44313c646687 (patch) | |
tree | 6e7a1985aecdbee605ae58ce7cc342c5d4e23027 /libbb/lineedit.c | |
parent | 399b1dd641c16113c3340933a9b1ab1793a13d8a (diff) | |
download | busybox-w32-b04bbc0109046ee69806a472fd7e44313c646687.tar.gz busybox-w32-b04bbc0109046ee69806a472fd7e44313c646687.tar.bz2 busybox-w32-b04bbc0109046ee69806a472fd7e44313c646687.zip |
win32: changes to user ids
Formalise the use of 0 as the uid of a process running with elevated
privileges:
- Rewrite getuid(2) to return DEFAULT_UID by default and 0 if the
process has elevated privileges.
- geteuid(2) and the corresponding functions for groups are aliases
for getuid(2).
- Change root's home directory to be whatever GetSystemDirectory()
returns, probably C:/Windows/System32 in most cases.
- Remove the special handling of geteuid(2) in the line editing code.
With these changes the shell started by 'su' is a lot more like a
*nix root shell.
Diffstat (limited to 'libbb/lineedit.c')
-rw-r--r-- | libbb/lineedit.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 9e24d410d..95f92aa75 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c | |||
@@ -45,9 +45,6 @@ | |||
45 | # define _POSIX_VDISABLE '\0' | 45 | # define _POSIX_VDISABLE '\0' |
46 | #endif | 46 | #endif |
47 | 47 | ||
48 | #if ENABLE_PLATFORM_MINGW32 | ||
49 | # define geteuid() (is_admin() ? 0 : DEFAULT_UID) | ||
50 | #endif | ||
51 | 48 | ||
52 | #ifdef TEST | 49 | #ifdef TEST |
53 | # define ENABLE_FEATURE_EDITING 0 | 50 | # define ENABLE_FEATURE_EDITING 0 |