diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-11-06 17:24:16 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-11-06 19:50:18 -0500 |
commit | 5a330cda0ce47bd333a4cf2c559031788a26e62a (patch) | |
tree | e3adb736f782e48d2264174075f1e09b8a4c1d68 /src/libsystemd-bus | |
parent | 7b147982869e300940be16d08fae8b2460c5857c (diff) |
pam_systemd: dup the fd received from logind
Otherwise sd_bus_message cleanup would close it.
Diffstat (limited to 'src/libsystemd-bus')
-rw-r--r-- | src/libsystemd-bus/test-bus-chat.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libsystemd-bus/test-bus-chat.c b/src/libsystemd-bus/test-bus-chat.c index efc19c68b3..a29fbdf9c4 100644 --- a/src/libsystemd-bus/test-bus-chat.c +++ b/src/libsystemd-bus/test-bus-chat.c @@ -228,6 +228,8 @@ static int server(sd_bus *bus) { goto fail; } + log_info("Received fd=%d", fd); + if (write(fd, &x, 1) < 0) { log_error("Failed to write to fd: %m"); close_nointr_nofail(fd); @@ -307,6 +309,8 @@ static void* client1(void*p) { goto finish; } + log_info("Sending fd=%d", pp[1]); + r = sd_bus_call_method( bus, "org.freedesktop.systemd.test", |