diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-10-22 12:09:04 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-10-22 12:09:04 +0000 |
commit | b4b204a913e938d9b478ed396b6d3721e4e1954d (patch) | |
tree | 21bfc00fdd9a568ffc5d7e74c73bacef3f6906e0 /bin | |
parent | 3fc4938e6b110e2027b1c5195eaf06a3a013eb3d (diff) |
setlocale() before pledge()... until we learn more
Diffstat (limited to 'bin')
-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; |