summaryrefslogtreecommitdiff
path: root/ubusd_event.c
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2018-10-03 15:36:16 +0200
committerHans Dedecker <dedeckeh@gmail.com>2018-10-06 20:39:20 +0200
commitc035bab01ccbd9efd21d4a3bc9eceb438729e15d (patch)
tree7a544e263be8aeca6869a2bf9b0db88adfcf6c8d /ubusd_event.c
parent73bd84748f0186893e3ea2cf66c22fed9557ee88 (diff)
downloadubus-c035bab01ccbd9efd21d4a3bc9eceb438729e15d.tar.gz
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>
Diffstat (limited to 'ubusd_event.c')
0 files changed, 0 insertions, 0 deletions