The 09-28 changes inadvertently removed some support for the
rarely-used SUPPRESS_TZDIR option.
* localtime.c (tzloadbody) [OPENAT_TZDIR && SUPPRESS_TZDIR]:
Do not open TZDIR, as when SUPPRESS_TZDIR we want relative
pathnames to be relative to the working directory, not to TZDIR.
---
 localtime.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/localtime.c b/localtime.c
index 3937e5dd..186c7bf3 100644
--- a/localtime.c
+++ b/localtime.c
@@ -667,7 +667,7 @@ tzloadbody(char const *name, struct state *sp, char 
tzloadflags,
                return ENOTCAPABLE;
          }
 
-         if (OPENAT_TZDIR) {
+         if (OPENAT_TZDIR && !SUPPRESS_TZDIR) {
            /* Prefer O_SEARCH or O_PATH if available;
               O_RDONLY should be OK too, as TZDIR is invariably readable.
               O_DIRECTORY should be redundant but might help
-- 
2.48.1

Reply via email to