projects
/
project
/
ubus.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
ubusd_acl: event listen access list support
[project/ubus.git]
/
ubusd_event.c
diff --git
a/ubusd_event.c
b/ubusd_event.c
index f07f8267869b3806125b279f67d95f45e10c7ee0..6e612a19070b19a2a65577a3143aefeeeab532d9 100644
(file)
--- a/
ubusd_event.c
+++ b/
ubusd_event.c
@@
-88,6
+88,9
@@
static int ubusd_alloc_event_pattern(struct ubus_client *cl, struct blob_attr *m
len--;
}
+ if (pattern[0] && ubusd_acl_check(cl, pattern, NULL, UBUS_ACL_LISTEN))
+ return UBUS_STATUS_PERMISSION_DENIED;
+
ev = calloc(1, sizeof(*ev) + len + 1);
if (!ev)
return UBUS_STATUS_NO_DATA;