wok view busybox/stuff/busybox-1.12.0-su.u @ rev 3196

busybox/su: fix environment
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed May 27 18:15:16 2009 +0200 (2009-05-27)
parents
children
line source
1 --- busybox-1.12.0/libbb/setup_environment.c
2 +++ busybox-1.12.0/libbb/setup_environment.c
3 @@ -59,7 +59,7 @@
4 else if (change_env) {
5 /* Set HOME, SHELL, and if not becoming a super-user,
6 USER and LOGNAME. */
7 - if (pw->pw_uid) {
8 + if (!pw->pw_uid) {
9 shortcut:
10 xsetenv("USER", pw->pw_name);
11 xsetenv("LOGNAME", pw->pw_name);