30 lines
1.0 KiB
Diff
30 lines
1.0 KiB
Diff
|
From 9dedfe7f667a8cb22ba85d0223556c69c4fd0e9a Mon Sep 17 00:00:00 2001
|
||
|
From: Tom Gundersen <teg@jklm.no>
|
||
|
Date: Thu, 18 Sep 2014 09:20:46 +0200
|
||
|
Subject: [PATCH] libudev: monitor - warn if we fail to request SO_PASSCRED
|
||
|
|
||
|
The function still succeeds, so there is no functional change. This fixes CID #996288.
|
||
|
---
|
||
|
src/libudev/libudev-monitor.c | 5 ++++-
|
||
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git src/libudev/libudev-monitor.c src/libudev/libudev-monitor.c
|
||
|
index 186e5e1..59698b8 100644
|
||
|
--- src/libudev/libudev-monitor.c
|
||
|
+++ 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;
|
||
|
}
|
||
|
|
||
|
--
|
||
|
1.7.9.2
|
||
|
|