ubusd: fix the return code for acl check mismatch
authorFelix Fietkau <nbd@openwrt.org>
Wed, 9 Dec 2015 18:48:08 +0000 (19:48 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 9 Dec 2015 18:48:08 +0000 (19:48 +0100)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
ubusd_proto.c

index 09faeb2ae3f7ed5c5a773186ae0a32fa9b077151..baf3eb63459a92209a278d42b638ad10cb52cbba 100644 (file)
@@ -257,7 +257,7 @@ static int ubusd_handle_invoke(struct ubus_client *cl, struct ubus_msg_buf *ub,
        method = blob_data(attr[UBUS_ATTR_METHOD]);
 
        if (ubusd_acl_check(cl, obj->path.key, method, UBUS_ACL_ACCESS))
-               return UBUS_STATUS_NOT_FOUND;
+               return UBUS_STATUS_PERMISSION_DENIED;
 
        if (!obj->client)
                return obj->recv_msg(cl, ub, method, attr[UBUS_ATTR_DATA]);