From d4f6a54d7b47ee2b66d7f9425763ca58550d1ab7 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Fri, 7 Jul 2023 14:08:59 +0000 Subject: Use open2() safe wrappers Signed-off-by: Laurent Bercot --- src/config/s6-frontend-config-preprocess.c | 4 ++-- 1 file 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() ; -- cgit v1.2.3