diff options
author | 2015-10-22 12:09:03 +0000 | |
---|---|---|
committer | 2015-10-22 12:09:03 +0000 | |
commit | c5eabb310473292acc756113d79947edbcd7b5ec (patch) | |
tree | fb1de86eb48d585b253375d6d2798be52a2c013f /bin/csh/csh.c | |
parent | remove some horrible iwm typedefs (diff) | |
download | wireguard-openbsd-c5eabb310473292acc756113d79947edbcd7b5ec.tar.xz wireguard-openbsd-c5eabb310473292acc756113d79947edbcd7b5ec.zip |
setlocale() before pledge()... until we learn more
Diffstat (limited to 'bin/csh/csh.c')
-rw-r--r-- | bin/csh/csh.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/bin/csh/csh.c b/bin/csh/csh.c index 3ef96b6e4a2..621aa52f8ed 100644 --- a/bin/csh/csh.c +++ b/bin/csh/csh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: csh.c,v 1.29 2015/10/18 03:09:11 deraadt Exp $ */ +/* $OpenBSD: csh.c,v 1.30 2015/10/22 12:09:03 deraadt Exp $ */ /* $NetBSD: csh.c,v 1.14 1995/04/29 23:21:28 mycroft Exp $ */ /*- @@ -104,10 +104,6 @@ main(int argc, char *argv[]) cshout = stdout; csherr = stderr; - if (pledge("stdio rpath wpath cpath fattr getpw proc exec tty", - NULL) == -1) - perror("pledge"); - settimes(); /* Immed. estab. timing base */ /* @@ -162,6 +158,11 @@ main(int argc, char *argv[]) AsciiOnly = 1; #ifdef NLS (void) setlocale(LC_ALL, ""); + + if (pledge("stdio rpath wpath cpath fattr getpw proc exec tty", + NULL) == -1) + perror("pledge"); + { int k; |