From ed14312d330dbd7afb668d0238eaca64f057b267 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Thu, 6 Jul 2023 13:00:46 +0000 Subject: Prepare for 0.5.4.2; use open3() safe wrapper Signed-off-by: Laurent Bercot --- src/libs6rc/s6rc_lock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/libs6rc/s6rc_lock.c b/src/libs6rc/s6rc_lock.c index 95e5d70..5bfb587 100644 --- a/src/libs6rc/s6rc_lock.c +++ b/src/libs6rc/s6rc_lock.c @@ -24,7 +24,7 @@ int s6rc_lock (char const *live, int lwhat, int *llfd, char const *compiled, int char lfn[llen + 6] ; memcpy(lfn, live, llen) ; memcpy(lfn + llen, "/lock", 6) ; - lfd = open(lfn, modefor(lwhat), 0644) ; + lfd = open3(lfn, modefor(lwhat), 0644) ; if (lfd < 0) return 0 ; r = fd_lock(lfd, lwhat > 1, !blocking) ; if (!r) errno = EBUSY ; @@ -38,7 +38,7 @@ int s6rc_lock (char const *live, int lwhat, int *llfd, char const *compiled, int char cfn[clen + 6] ; memcpy(cfn, compiled, clen) ; memcpy(cfn + clen, "/lock", 6) ; - cfd = open(cfn, modefor(cwhat), 0644) ; + cfd = open3(cfn, modefor(cwhat), 0644) ; if (cfd < 0) goto lerr ; r = fd_lock(cfd, cwhat > 1, !blocking) ; if (!r) errno = EBUSY ; -- cgit v1.2.3