s6

Mirror/fork of https://skarnet.org/software/s6/
git clone https://ccx.te2000.cz/git/s6
Log | Files | Refs | README | LICENSE

commit ce2977ee9195612730bc8713f142c95f79605e75
parent f24d6bdcdfd5f955cbc72ae9e0eb2d2778ecf06a
Author: Laurent Bercot <ska-skaware@skarnet.org>
Date:   Sat, 24 Jul 2021 15:08:38 +0000

 Change to cdb_find_state

Signed-off-by: Laurent Bercot <ska@appnovation.com>

Diffstat:
Msrc/libs6/s6_accessrules_backend_cdb.c | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 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) ;