ubusd: don't check ACL when object is NULL
If there are any ACLs present other than global wildcard "*", the AVL tree comparator will compare ACL key to object name. However, object name can be NULL in cases where ACL check is done on call to internal ubus objects (e.g. ubus monitor). With this change we skip checking ACLs on such NULL objects. Signed-off-by: Denis Osvald <denis.osvald@sartura.hr>
This commit is contained in:
parent
686c05d738
commit
d6bb4f1a1d
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue