shared/wall: use logind if build without utmp support

If systemd is build without utmp support, use sd_get_sessions() in
utmp_wall() to get a list of logged in users with the corresponding tty.
This commit is contained in:
Thorsten Kukuk
2023-09-06 13:19:26 +01:00
committed by Luca Boccassi
parent 468018703c
commit 53c0397b1d
10 changed files with 227 additions and 153 deletions
+2 -2
View File
@@ -6,7 +6,7 @@
#include "journald-wall.h"
#include "process-util.h"
#include "string-util.h"
#include "utmp-wtmp.h"
#include "wall.h"
void server_forward_wall(
Server *s,
@@ -48,7 +48,7 @@ void server_forward_wall(
} else
l = message;
r = utmp_wall(l, "systemd-journald", NULL, NULL, NULL);
r = wall(l, "systemd-journald", NULL, NULL, NULL);
if (r < 0)
log_debug_errno(r, "Failed to send wall message: %m");
}