summaryrefslogtreecommitdiff
path: root/lib/libc/locale/setlocale.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/locale/setlocale.c')
-rw-r--r--lib/libc/locale/setlocale.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libc/locale/setlocale.c b/lib/libc/locale/setlocale.c
index 5f34ca19d10..a7ee9fe56c6 100644
--- a/lib/libc/locale/setlocale.c
+++ b/lib/libc/locale/setlocale.c
@@ -35,7 +35,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: setlocale.c,v 1.2 1996/08/19 08:28:24 tholo Exp $";
+static char rcsid[] = "$OpenBSD: setlocale.c,v 1.3 1996/08/26 00:17:18 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/localedef.h>
@@ -91,7 +91,8 @@ setlocale(category, locale)
int found, i, len;
char *env, *r;
- if (!PathLocale && !(PathLocale = getenv("PATH_LOCALE")))
+ if (issetugid() != 0 ||
+ (!PathLocale && !(PathLocale = getenv("PATH_LOCALE"))))
PathLocale = _PATH_LOCALE;
if (category < 0 || category >= _LC_LAST)