From f09bbcb6bb536104c38dc95b96316f0ddab29edc Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" <Todd.Miller@courtesan.com> Date: Wed, 5 Jan 2011 16:27:44 -0500 Subject: [PATCH] Protect call to setlocale() with HAVE_SETLOCALE --- plugins/sudoers/iolog_path.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/sudoers/iolog_path.c b/plugins/sudoers/iolog_path.c index cf0a49d1a..23345ca18 100644 --- a/plugins/sudoers/iolog_path.c +++ b/plugins/sudoers/iolog_path.c @@ -245,7 +245,9 @@ expand_iolog_path(const char *prefix, const char *dir, const char *file, buf = erealloc(buf, psize); buf[psize - 1] = '\0'; } while (!strftime(buf, psize, path, timeptr) || buf[psize - 1] != '\0'); +#ifdef HAVE_SETLOCALE setlocale(LC_ALL, ""); +#endif if (slashp) *slashp = buf + (*slashp - path); efree(path); -- 2.40.0