A message system like D-Bus for Liminix, taken from OpenWRT's ubus
Find a file
Hans Dedecker c035bab01c ubusd_acl: rework wildcard support
Wildcard access list support was failing in case multiple wildcards
entries were defined and/or when a specific access list string
overlapped a wildcard entry.
Root cause of the problem was the way how wildcard entries were sorted
in the avl tree by the compare function ubusd_acl_match_path resulting
into a non acces list match for a given object path.

The avl_tree sorting has been changed to make use of avl_strcmp; as such
there's no distinction anymore between non-wildcard and wildcard entries
in the avl_tree compare function as the boolean partial marks an access
list entry as a wildcard entry.

When trying to find an access list match for an object path the access list
tree is iterated as long as the number of characters between the access list
string and object path is monotonically increasing.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2018-10-06 20:39:20 +02:00
examples cmake: Fix find_library for ubusd and examples/server 2016-07-01 15:12:28 +02:00
lua ubus/lua: add support for BLOBMSG_TYPE_DOUBLE 2018-09-10 09:48:17 +02:00
.gitignore examples: split client/server code 2012-10-24 14:37:57 +02:00
cli.c cli: fix listen_timeout compile issue 2017-02-20 11:32:19 +01:00
CMakeLists.txt build: remove /opt/local prefix 2016-11-20 16:26:19 +01:00
libubus-acl.c add acl code 2015-06-18 19:01:17 +02:00
libubus-internal.h Allow sending a fd along a ubus_request 2016-12-24 14:31:04 +01:00
libubus-io.c libubus: reset ctx->sock.error when doing ubus reconnect 2017-02-20 11:31:56 +01:00
libubus-obj.c libubus: check for non-NULL data before running callbacks 2018-07-25 10:45:34 +02:00
libubus-req.c libubus: pass an empty UBUS_ATTR_DATA block if msg is NULL on invoke 2018-07-26 15:20:40 +02:00
libubus-sub.c libubus: fix passing the return code of the subscriber callback to the notifier 2013-03-17 18:29:38 +01:00
libubus.c ubus: Remove unnecessary memset calls. 2017-11-13 09:46:12 +01:00
libubus.h libubus-req: add data_cb callback handling for ubus notifications 2017-11-06 08:23:08 +01:00
ubus_common.h ubusd_event: move strmatch_len to ubus_common.h 2018-10-06 20:39:03 +02:00
ubusd.c ubusd: don't free messages in ubus_send_msg() anymore 2017-11-13 09:55:19 +01:00
ubusd.h ubusd: move global retmsg per client 2017-11-13 10:09:28 +01:00
ubusd_acl.c ubusd_acl: rework wildcard support 2018-10-06 20:39:20 +02:00
ubusd_acl.h ubusd: fix a memory leak on user/group client info 2016-01-26 10:10:39 +01:00
ubusd_event.c ubusd_event: move strmatch_len to ubus_common.h 2018-10-06 20:39:03 +02:00
ubusd_id.c ubusd: use avl_strcmp 2012-12-11 23:38:00 +01:00
ubusd_id.h add copyright/license information 2011-06-17 16:35:11 +02:00
ubusd_monitor.c ubusd_monitor: alloc & free the buffer outside of the loop 2017-11-13 09:57:55 +01:00
ubusd_obj.c ubusd: add monitor support 2015-11-19 22:32:11 +01:00
ubusd_obj.h pass ubus_msg_buf to callback of internal object 2015-06-18 19:01:17 +02:00
ubusd_proto.c ubusd: move global retmsg per client 2017-11-13 10:09:28 +01:00
ubusmsg.h ubusd: add monitor support 2015-11-19 22:32:11 +01:00