]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/tty-ask-password-agent/tty-ask-password-agent.c
shared/utmp-wtmp: add parameter for origin tty and callback userdata
[thirdparty/systemd.git] / src / tty-ask-password-agent / tty-ask-password-agent.c
index bdf651246bd0dad742e017a6c157cea0b1e45a74..c440170f950a75092a3d1946838300a52352e37d 100644 (file)
@@ -25,7 +25,7 @@
 #include <sys/socket.h>
 #include <sys/un.h>
 #include <stddef.h>
-#include <sys/poll.h>
+#include <poll.h>
 #include <sys/inotify.h>
 #include <unistd.h>
 #include <getopt.h>
@@ -42,6 +42,8 @@
 #include "strv.h"
 #include "build.h"
 #include "def.h"
+#include "process-util.h"
+#include "terminal-util.h"
 
 static enum {
         ACTION_LIST,
@@ -379,7 +381,7 @@ static int wall_tty_block(void) {
         return fd;
 }
 
-static bool wall_tty_match(const char *path) {
+static bool wall_tty_match(const char *path, void *userdata) {
         int fd, r;
         struct stat st;
         _cleanup_free_ char *p = NULL;
@@ -453,7 +455,7 @@ static int show_passwords(void) {
                         r = q;
 
                 if (wall)
-                        utmp_wall(wall, NULL, wall_tty_match);
+                        utmp_wall(wall, NULL, NULL, wall_tty_match, NULL);
         }
 
         return r;