[systemd-devel] [PATCH 3/4] handle: change return value from -EFAULT to -EPERM

Djalal Harouni tixxdz at opendz.org
Sun Mar 30 17:41:25 PDT 2014


Return -EPERM if current does not have the appropriate privileges to
create custom endpoints.

Signed-off-by: Djalal Harouni <tixxdz at opendz.org>
---
 handle.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/handle.c b/handle.c
index 8082241..eda88c1 100644
--- a/handle.c
+++ b/handle.c
@@ -419,7 +419,7 @@ static long kdbus_handle_ioctl_ep(struct file *file, unsigned int cmd,
 
 		/* creating custom endpoints is a privileged operation */
 		if (!kdbus_bus_uid_is_privileged(handle->ep->bus)) {
-			ret = -EFAULT;
+			ret = -EPERM;
 			break;
 		}
 
-- 
1.8.5.3



More information about the systemd-devel mailing list