chiark / gitweb /
sd-bus: invert bus->is_kernel check in sd_bus_get_peer_creds()
authorDaniel Mack <zonque@gmail.com>
Mon, 24 Mar 2014 13:44:58 +0000 (14:44 +0100)
committerDaniel Mack <zonque@gmail.com>
Mon, 24 Mar 2014 13:45:34 +0000 (14:45 +0100)
The bug was introducted in a3d59cd1 ("sd-bus: don't use assert_return()
to check for disconnected bus connections")

src/libsystemd/sd-bus/sd-bus.c

index 3929b35..7074dc7 100644 (file)
@@ -3268,7 +3268,7 @@ _public_ int sd_bus_get_peer_creds(sd_bus *bus, uint64_t mask, sd_bus_creds **re
         assert_return(ret, -EINVAL);
         assert_return(!bus_pid_changed(bus), -ECHILD);
 
-        if (!bus->is_kernel)
+        if (bus->is_kernel)
                 return -ENOTSUP;
 
         if (!BUS_IS_OPEN(bus->state))