From d02608170e599b1ffbc7c9a22062bae2579d6e36 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 25 Oct 2015 23:20:05 +0100 Subject: util: remove lookup_uid(), replace by uid_to_name() So far we had two pretty much identical calls in user-util.[ch]: lookup_uid() and uid_to_name(). Get rid of the former, in favour of the latter, and while we are at it, rewrite it, to use getpwuid_r() correctly, inside an allocation loop, as POSIX intended. --- src/login/logind-utmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/login/logind-utmp.c') diff --git a/src/login/logind-utmp.c b/src/login/logind-utmp.c index 80e461f2dc..9c766bcb25 100644 --- a/src/login/logind-utmp.c +++ b/src/login/logind-utmp.c @@ -96,7 +96,7 @@ static int warn_wall(Manager *m, usec_t n) { return 0; } - utmp_wall(l, lookup_uid(m->scheduled_shutdown_uid), + utmp_wall(l, uid_to_name(m->scheduled_shutdown_uid), m->scheduled_shutdown_tty, logind_wall_tty_filter, m); return 1; -- cgit v1.2.3-54-g00ecf