summaryrefslogtreecommitdiff
path: root/src/libudev/libudev-monitor.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-09-18 09:20:46 +0200
committerAnthony G. Basile <blueness@gentoo.org>2014-09-18 18:47:23 -0400
commitabc50f3d922a50905063c2cc0dd64dfd1b0b9e6c (patch)
tree229c93b14f934e069e99299d15fa2a1c34ddfc01 /src/libudev/libudev-monitor.c
parent15f72fb47214133818a9b20ad4d4cb3d8c4fa508 (diff)
libudev: monitor - warn if we fail to request SO_PASSCRED
The function still succeeds, so there is no functional change. This fixes CID #996288. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/libudev/libudev-monitor.c')
-rw-r--r--src/libudev/libudev-monitor.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libudev/libudev-monitor.c b/src/libudev/libudev-monitor.c
index 4476c1d17e..137ea148d7 100644
--- a/src/libudev/libudev-monitor.c
+++ b/src/libudev/libudev-monitor.c
@@ -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;
}