diff options
author | Ron Yorston <rmy@pobox.com> | 2023-03-27 08:57:40 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2023-03-27 08:57:40 +0100 |
commit | 255ebaf535c9f6d8a88e23d55d8be04b0ea73343 (patch) | |
tree | 160986f98132d365c341ae17a0ce13a9d6f2f763 /docs | |
parent | f4178f8d0b97baea0bb6a6444fc37171c83ad316 (diff) | |
download | busybox-w32-255ebaf535c9f6d8a88e23d55d8be04b0ea73343.tar.gz busybox-w32-255ebaf535c9f6d8a88e23d55d8be04b0ea73343.tar.bz2 busybox-w32-255ebaf535c9f6d8a88e23d55d8be04b0ea73343.zip |
drop: adjust environment on privilege change
Some environment variables are subject to special treatment: USER,
LOGNAME, HOME and SHELL are initialised when the shell starts if
they don't already have a value.
Some adjustments are necessary when changing privilege level:
- USERNAME is added to the set of variables subject to special
treatment. Unlike the others this is normally set on Windows.
- The special variables are now also updated on shell start up if
the current process is running with elevated privileges. This is
necessary so USER, USERNAME and LOGNAME have the correct value.
- USER, USERNAME and LOGNAME are set to the name of the unprivileged
user when elevated privileges are dropped, though not if they've
been changed from the expected value of "root".
Costs 160-208 bytes.
(GitHub issue #300)
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions