summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-11-19 06:07:17 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-11-19 06:07:17 +0000
commit3fe80f98fefd332c83c5527aeb27a8c42e75939a (patch)
tree498335d90b4d33771299794044523b94dbe3fa2d /usr.bin
parent3af1b53153e596e186e6892b59c06e8816ada591 (diff)
pledge "stdio rpath". Might not need "rpath", but ...
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/locale/locale.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/locale/locale.c b/usr.bin/locale/locale.c
index 26efc4012ad..c8a132b2da1 100644
--- a/usr.bin/locale/locale.c
+++ b/usr.bin/locale/locale.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: locale.c,v 1.9 2015/08/14 14:31:49 stsp Exp $ */
+/* $OpenBSD: locale.c,v 1.10 2015/11/19 06:07:16 deraadt Exp $ */
/*
* Copyright (c) 2013 Stefan Sperling <stsp@openbsd.org>
*
@@ -20,6 +20,7 @@
#include <string.h>
#include <locale.h>
#include <unistd.h>
+#include <err.h>
extern char *__progname;
@@ -179,6 +180,9 @@ main(int argc, char *argv[])
setlocale(LC_ALL, "");
+ if (pledge("stdio rpath", NULL) == -1)
+ err(1, "pledge");
+
if (argc == 1) {
show_current_locale();
return 0;