diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-06-21 23:27:18 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-06-21 23:27:18 +0200 |
commit | 8c6db8336536916d0476ff8233e0abf40a2f6aab (patch) | |
tree | 66ea4c87f407d9ed24eed9539cf9a5275045add2 /src/utmp-wtmp.c | |
parent | 96551bae6107936a4576b9b4b391abbc9963bdfe (diff) |
pam: implement systemd PAM module and generelize cgroup API for that a bit
Diffstat (limited to 'src/utmp-wtmp.c')
-rw-r--r-- | src/utmp-wtmp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/utmp-wtmp.c b/src/utmp-wtmp.c index d7cda82d5a..45da79c681 100644 --- a/src/utmp-wtmp.c +++ b/src/utmp-wtmp.c @@ -296,12 +296,14 @@ int utmp_wall(const char *message) { time_t t; if (!(hn = gethostname_malloc()) || - !(un = getlogname_malloc()) || - !(tty = getttyname_malloc())) { + !(un = getlogname_malloc())) { r = -ENOMEM; goto finish; } + if ((r = getttyname_malloc(&tty)) < 0) + goto finish; + time(&t); assert_se(ctime_r(&t, date)); delete_chars(date, "\n\r"); |