summaryrefslogtreecommitdiff
path: root/src/libudev
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-09-18 09:20:46 +0200
committerTom Gundersen <teg@jklm.no>2014-09-18 13:48:44 +0200
commit9dedfe7f667a8cb22ba85d0223556c69c4fd0e9a (patch)
tree17b2ec64f97b16219ff65af50fc822d4552e2f21 /src/libudev
parent76082570b8115c3410bac42bb5842ba201dddb76 (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.
Diffstat (limited to 'src/libudev')
-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 186e5e1e87..59698b85b7 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;
}