chiark / gitweb /
libudev: monitor - warn if we fail to request SO_PASSCRED
authorTom Gundersen <teg@jklm.no>
Thu, 18 Sep 2014 07:20:46 +0000 (09:20 +0200)
committerTom Gundersen <teg@jklm.no>
Thu, 18 Sep 2014 11:48:44 +0000 (13:48 +0200)
The function still succeeds, so there is no functional change. This fixes CID #996288.

src/libudev/libudev-monitor.c

index 186e5e1..59698b8 100644 (file)
@@ -412,7 +412,10 @@ _public_ int udev_monitor_enable_receiving(struct udev_monitor *udev_monitor)
         }
 
         /* enable receiving of sender credentials */
-        setsockopt(udev_monitor->sock, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on));
+        err = setsockopt(udev_monitor->sock, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on));
+        if (err < 0)
+                udev_err(udev_monitor->udev, "setting SO_PASSCRED failed: %m\n");
+
         return 0;
 }