|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From 9dedfe7f667a8cb22ba85d0223556c69c4fd0e9a Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From: Tom Gundersen <teg@jklm.no>
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Date: Thu, 18 Sep 2014 09:20:46 +0200
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Subject: [PATCH] libudev: monitor - warn if we fail to request SO_PASSCRED
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
The function still succeeds, so there is no functional change. This fixes CID #996288.
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
src/libudev/libudev-monitor.c | 5 ++++-
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
diff --git a/src/libudev/libudev-monitor.c b/src/libudev/libudev-monitor.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
index 186e5e1e87..59698b85b7 100644
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
--- a/src/libudev/libudev-monitor.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+++ b/src/libudev/libudev-monitor.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
@@ -412,7 +412,10 @@ _public_ int udev_monitor_enable_receiving(struct udev_monitor *udev_monitor)
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
}
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
/* enable receiving of sender credentials */
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- setsockopt(udev_monitor->sock, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on));
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ err = setsockopt(udev_monitor->sock, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on));
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ if (err < 0)
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ udev_err(udev_monitor->udev, "setting SO_PASSCRED failed: %m\n");
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
return 0;
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
}
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|