summaryrefslogtreecommitdiff
path: root/src/conn-tools/s6-ipcserver-access.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2021-07-23 20:01:58 +0000
committerLaurent Bercot <ska@appnovation.com>2021-07-23 20:01:58 +0000
commitf24d6bdcdfd5f955cbc72ae9e0eb2d2778ecf06a (patch)
tree10f24fae2f0d8a0e0e74cbd4a71113fdf7c58c74 /src/conn-tools/s6-ipcserver-access.c
parentc9fcfbf294edb01b149a75465a4beb14c3a5dd56 (diff)
downloads6-f24d6bdcdfd5f955cbc72ae9e0eb2d2778ecf06a.tar.xz
Prepare for 2.11.0.0, adapt to skalibs-2.11.0.0 (cdb changes)
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/conn-tools/s6-ipcserver-access.c')
-rw-r--r--src/conn-tools/s6-ipcserver-access.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/conn-tools/s6-ipcserver-access.c b/src/conn-tools/s6-ipcserver-access.c
index 0356f60..a5c2bd7 100644
--- a/src/conn-tools/s6-ipcserver-access.c
+++ b/src/conn-tools/s6-ipcserver-access.c
@@ -75,14 +75,11 @@ static inline void log_deny (pid_t pid, uid_t uid, gid_t gid)
static s6_accessrules_result_t check_cdb (uid_t uid, gid_t gid, char const *file, s6_accessrules_params_t *params)
{
- struct cdb c = CDB_ZERO ;
- int fd = open_readb(file) ;
+ cdb c = CDB_ZERO ;
s6_accessrules_result_t r ;
- if (fd < 0) return -1 ;
- if (cdb_init(&c, fd) < 0) strerr_diefu2sys(111, "cdb_init ", file) ;
+ if (!cdb_init(&c, file)) strerr_diefu2sys(111, "cdb_init ", file) ;
r = s6_accessrules_uidgid_cdb(uid, gid, &c, params) ;
cdb_free(&c) ;
- fd_close(fd) ;
return r ;
}