aboutsummaryrefslogtreecommitdiff
path: root/loginutils
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-04-04 23:45:09 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-04-04 23:45:09 +0200
commit4c721049c3114c946848fbbd38d6180aa7af537d (patch)
tree3355d5721cd131e5526caa3a47a517c3586d3ade /loginutils
parentf8fcc184b6e05cbf5f88aa4f4e716e137a69f97e (diff)
downloadbusybox-4c721049c3114c946848fbbd38d6180aa7af537d.tar.gz
who: fix attempts to open '/dev/dev/ttyX'; make columns a bit wider, add -H
function old new delta who_main 292 363 +71 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'loginutils')
-rw-r--r--loginutils/login.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/loginutils/login.c b/loginutils/login.c
index b5e348b66..256c7c475 100644
--- a/loginutils/login.c
+++ b/loginutils/login.c
@@ -61,7 +61,7 @@ static void read_or_build_utent(struct utmp *utptr, int run_by_root)
/* First, try to find a valid utmp entry for this process. */
/* If there is one, just use it. */
- while ((ut = getutent()) != NULL)
+ while ((ut = getutent()) != NULL) {
if (ut->ut_pid == pid && ut->ut_line[0] && ut->ut_id[0]
&& (ut->ut_type == LOGIN_PROCESS || ut->ut_type == USER_PROCESS)
) {
@@ -70,6 +70,7 @@ static void read_or_build_utent(struct utmp *utptr, int run_by_root)
memset(utptr->ut_host, 0, sizeof(utptr->ut_host));
return;
}
+ }
// Why? Do we require non-root to exec login from another
// former login process (e.g. login shell)? Some login's have