busybox su does not update $USER and $LOGNAME
Pascal Bellard
pascal.bellard at ads-lu.com
Wed May 27 16:29:57 UTC 2009
Hello,
busybox su does not update $USER and $LOGNAME.
The fix:
http://hg.slitaz.org/wok/rawfile/tip/busybox/stuff/busybox-1.12.0-su.u
--- busybox-1.12.0/libbb/setup_environment.c
+++ busybox-1.12.0/libbb/setup_environment.c
@@ -59,7 +59,7 @@
else if (change_env) {
/* Set HOME, SHELL, and if not becoming a super-user,
USER and LOGNAME. */
- if (pw->pw_uid) {
+ if (!pw->pw_uid) {
shortcut:
xsetenv("USER", pw->pw_name);
xsetenv("LOGNAME", pw->pw_name);
Hope it helps,
-pascal
More information about the busybox
mailing list