diff options
author | Sami Kerola | 2014-12-08 23:20:55 +0100 |
---|---|---|
committer | Karel Zak | 2014-12-09 09:19:39 +0100 |
commit | 123f0f5bf00635e5dd7e5cbc73f906bf2a0bed9c (patch) | |
tree | 584fd733c29be7588b11fdf6488f5371bf662d5d /login-utils/lslogins.c | |
parent | build-sys: hwclock requires -lm (diff) | |
download | kernel-qcow2-util-linux-123f0f5bf00635e5dd7e5cbc73f906bf2a0bed9c.tar.gz kernel-qcow2-util-linux-123f0f5bf00635e5dd7e5cbc73f906bf2a0bed9c.tar.xz kernel-qcow2-util-linux-123f0f5bf00635e5dd7e5cbc73f906bf2a0bed9c.zip |
lslogins: fix assertion failure for none existing logins
This cange makes the following to retun none-zero value instead of a core
dump.
$ lslogins qwertyuiopasdfghjklzxcvbnm1234567
lslogins: libsmartcols/src/line.c:362: scols_line_get_cell: Assertion `ln' failed.
Aborted (core dumped)
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'login-utils/lslogins.c')
-rw-r--r-- | login-utils/lslogins.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/login-utils/lslogins.c b/login-utils/lslogins.c index 7867404c9..38d3cf681 100644 --- a/login-utils/lslogins.c +++ b/login-utils/lslogins.c @@ -842,7 +842,7 @@ static int get_user(struct lslogins_control *ctl, struct lslogins_user **user, const char *username) { *user = get_user_info(ctl, username); - if (!*user && errno) + if (!*user) if (IS_REAL_ERRNO(errno)) return -1; return 0; |