summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2023-07-06 13:00:46 +0000
committerLaurent Bercot <ska@appnovation.com>2023-07-06 13:00:46 +0000
commited14312d330dbd7afb668d0238eaca64f057b267 (patch)
tree13052787c73ed903bae28c189005ebeb7190d655 /src
parent97228d54c83697a1c7862816e151e4fdc022b5a7 (diff)
downloads6-rc-ed14312d330dbd7afb668d0238eaca64f057b267.tar.xz
Prepare for 0.5.4.2; use open3() safe wrapper
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src')
-rw-r--r--src/libs6rc/s6rc_lock.c4
1 files changed, 2 insertions, 2 deletions
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 ;