lua: add 'defer_request' and 'complete_deferred_request' functions
[project/ubus.git] / ubusd_acl.c
index 85ada5d..4b72663 100644 (file)
@@ -101,7 +101,7 @@ ubusd_acl_check(struct ubus_client *cl, const char *obj,
        struct blob_attr *cur;
        int rem;
 
-       if (!cl->uid)
+       if (!cl->uid || !obj)
                return 0;
 
        acl = avl_find_ge_element(&ubusd_acls, obj, acl, avl);
@@ -434,7 +434,7 @@ ubusd_reply_add(struct ubus_object *obj)
                if (!acl->priv)
                        continue;
 
-               if (!ubusd_acl_match_path(obj->path.key, acl->avl.key, NULL))
+               if (ubusd_acl_match_path(obj->path.key, acl->avl.key, NULL))
                        continue;
 
                c = blobmsg_open_table(&b, NULL);