hook acl into libubus
Signed-off-by: John Crispin <blogic@openwrt.org>
This commit is contained in:
parent
8309c75828
commit
2cfdb81889
1 changed files with 5 additions and 1 deletions
|
@ -69,7 +69,11 @@ ubus_process_invoke(struct ubus_context *ctx, struct ubus_msghdr *hdr,
|
|||
req.peer = hdr->peer;
|
||||
req.seq = hdr->seq;
|
||||
req.object = obj->id;
|
||||
|
||||
if (attrbuf[UBUS_ATTR_USER] && attrbuf[UBUS_ATTR_GROUP]) {
|
||||
req.acl.user = blobmsg_get_string(attrbuf[UBUS_ATTR_USER]);
|
||||
req.acl.group = blobmsg_get_string(attrbuf[UBUS_ATTR_GROUP]);
|
||||
req.acl.object = obj->name;
|
||||
}
|
||||
for (method = 0; method < obj->n_methods; method++)
|
||||
if (!obj->methods[method].name ||
|
||||
!strcmp(obj->methods[method].name,
|
||||
|
|
Loading…
Reference in a new issue