handle: change return value from -EFAULT to -EPERM
authorDjalal Harouni <tixxdz@opendz.org>
Mon, 31 Mar 2014 00:41:25 +0000 (01:41 +0100)
committerKay Sievers <kay@vrfy.org>
Mon, 31 Mar 2014 12:26:35 +0000 (14:26 +0200)
Return -EPERM if current does not have the appropriate privileges to
create custom endpoints.

Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
handle.c

index 8082241c8a6a5dd01fb2c97836c6103c481ffb2f..eda88c1f5552b5b7665020f547139c7fc9506b7e 100644 (file)
--- 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;
                }