summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2023-07-07 14:08:59 +0000
committerLaurent Bercot <ska@appnovation.com>2023-07-07 14:08:59 +0000
commitd4f6a54d7b47ee2b66d7f9425763ca58550d1ab7 (patch)
tree9d72328dae571dc8c927f7a39fa26221a9325980
parent68c9ed36a27e3ce91c4ff155a018fad87962b159 (diff)
downloads6-frontend-d4f6a54d7b47ee2b66d7f9425763ca58550d1ab7.tar.xz
Use open2() safe wrappers
Signed-off-by: Laurent Bercot <ska@appnovation.com>
-rw-r--r--src/config/s6-frontend-config-preprocess.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/config/s6-frontend-config-preprocess.c b/src/config/s6-frontend-config-preprocess.c
index 9aec923..d66eb7a 100644
--- a/src/config/s6-frontend-config-preprocess.c
+++ b/src/config/s6-frontend-config-preprocess.c
@@ -156,7 +156,7 @@ static int includefromhere (char const *file, int once)
{
static unsigned char const table[8][5] =
{
- { 0x08, 0x10, 0x02, 0x10, 0x10 },
+ { 0x08, 0x10, 0x02, 0x11, 0x11 },
{ 0x08, 0x10, 0x11, 0x11, 0x11 },
{ 0x08, 0x00, 0x03, 0x04, 0x25 },
{ 0x08, 0x00, 0x03, 0x03, 0x03 },
@@ -208,7 +208,7 @@ static int includefromhere (char const *file, int once)
}
if (what & 0x0080)
{
- int fdhere = open(".", O_RDONLY | O_DIRECTORY) ;
+ int fdhere = open2(".", O_RDONLY | O_DIRECTORY) ;
if (fdhere < 0)
strerr_dief3sys(111, "in ", sa.s + sabase, ": unable to open base directory: ") ;
if (!stralloc_0(&localsa)) dienomem() ;