diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-04-05 01:45:09 +0400 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-04-05 01:45:09 +0400 |
commit | 4c721049c3114c946848fbbd38d6180aa7af537d (patch) | |
tree | 3355d5721cd131e5526caa3a47a517c3586d3ade /loginutils | |
parent | f8fcc184b6e05cbf5f88aa4f4e716e137a69f97e (diff) |
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.c | 3 |
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 |