utmp-wtmp: allow overriding username on wall

utmp_wall() now takes an optional argument 'username_override' which
allows the caller to override the username shown on wall messages.
journald will use this to inform users that its wall messages comes from
'systemd-journald'.
This commit is contained in:
Sebastian Thorarensen
2014-03-14 21:27:33 +01:00
committed by Lennart Poettering
parent 5a4d665ad6
commit 9003d9b0d6
5 changed files with 13 additions and 9 deletions
+2 -2
View File
@@ -257,7 +257,7 @@ static void warn_wall(enum action a) {
}
if (*p) {
utmp_wall(p, NULL);
utmp_wall(p, NULL, NULL);
return;
}
}
@@ -265,7 +265,7 @@ static void warn_wall(enum action a) {
if (!table[a])
return;
utmp_wall(table[a], NULL);
utmp_wall(table[a], NULL, NULL);
}
static bool avoid_bus(void) {