From a8310e39e996b9b5f63d897879aecf8988261bdb Mon Sep 17 00:00:00 2001 From: Jason Francis Date: Mon, 19 Apr 2021 12:13:03 -0400 Subject: [PATCH 1/2] sd-login: correct prototype of sd_peer_get_cgroup --- src/systemd/sd-login.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/systemd/sd-login.h b/src/systemd/sd-login.h index 6958d99a1e..d3ad6abef1 100644 --- a/src/systemd/sd-login.h +++ b/src/systemd/sd-login.h @@ -110,7 +110,7 @@ int sd_peer_get_machine_name(int fd, char **machine); /* Similar to sd_pid_get_cgroup(), but retrieves data about the peer * of a connected AF_UNIX socket. */ -int sd_peer_get_cgroup(pid_t pid, char **cgroup); +int sd_peer_get_cgroup(int fd, char **cgroup); /* Get state from UID. Possible states: offline, lingering, online, active, closing */ int sd_uid_get_state(uid_t uid, char **state); From 941c5275eaaf8d22915eb876045d2173bdbb7d4c Mon Sep 17 00:00:00 2001 From: Jason Francis Date: Mon, 19 Apr 2021 12:16:26 -0400 Subject: [PATCH 2/2] sd-login: fix wrong constructor used in sd_login_monitor manpage example --- man/sd_login_monitor_new.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/sd_login_monitor_new.xml b/man/sd_login_monitor_new.xml index 57d22f9f65..081796249d 100644 --- a/man/sd_login_monitor_new.xml +++ b/man/sd_login_monitor_new.xml @@ -115,7 +115,7 @@ __attribute__((cleanup(sd_login_monitor_unrefp))) sd_login_monitor *m = NULL; int r; … - r = sd_login_monitor_default(&m); + r = sd_login_monitor_new(NULL, &m); if (r < 0) fprintf(stderr, "Failed to allocate login monitor object: %s\n", strerror(-r)); …