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


_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to