summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2021-07-24 15:08:38 +0000
committerLaurent Bercot <ska@appnovation.com>2021-07-24 15:08:38 +0000
commitce2977ee9195612730bc8713f142c95f79605e75 (patch)
tree4f5a086fabf518d45cb64fc86cabe887a84d0a9a /src
parentf24d6bdcdfd5f955cbc72ae9e0eb2d2778ecf06a (diff)
downloads6-ce2977ee9195612730bc8713f142c95f79605e75.tar.xz
Change to cdb_find_state
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src')
-rw-r--r--src/libs6/s6_accessrules_backend_cdb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libs6/s6_accessrules_backend_cdb.c b/src/libs6/s6_accessrules_backend_cdb.c
index 49eca68..848a905 100644
--- a/src/libs6/s6_accessrules_backend_cdb.c
+++ b/src/libs6/s6_accessrules_backend_cdb.c
@@ -7,6 +7,7 @@
#include <skalibs/uint16.h>
#include <skalibs/cdb.h>
#include <skalibs/stralloc.h>
+
#include <s6/accessrules.h>
s6_accessrules_result_t s6_accessrules_backend_cdb (char const *key, size_t keylen, void const *arg, s6_accessrules_params_t *params)
@@ -15,8 +16,8 @@ s6_accessrules_result_t s6_accessrules_backend_cdb (char const *key, size_t keyl
int wasnull = !params->env.s ;
uint16_t envlen, execlen ;
cdb const *c = arg ;
- cdb_reader reader = CDB_READER_ZERO ;
- int r = cdb_find(c, &reader, &data, key, keylen) ;
+ cdb_find_state cfs = CDB_FIND_STATE_ZERO ;
+ int r = cdb_find(c, &data, key, keylen, &cfs) ;
if (r < 0) return S6_ACCESSRULES_ERROR ;
else if (!r) return S6_ACCESSRULES_NOTFOUND ;
if (!data.len || data.len > 8197) return (errno = EINVAL, S6_ACCESSRULES_ERROR) ;