diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-10-05 05:24:13 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-10-05 05:24:13 +0000 |
commit | dab36ac6a1d1c63591e3306fad48136245cfcabf (patch) | |
tree | cab89e43d9aa811e0fb44cfb79f40359fa776391 /bin/pwd | |
parent | b8515c4b031de0c0839583feec5cdd7011f036d5 (diff) |
tame "stdio rpath" works for all use cases of pwd(1). In part this
success could be because our getcwd() is backed by a system call, unlike
historical practice. Didn't think it through competely, but this could
burn someone else later, if they try to port this code to another system.
Anyways, good enough for us.
all cases tested by doug
Diffstat (limited to 'bin/pwd')
-rw-r--r-- | bin/pwd/pwd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/pwd/pwd.c b/bin/pwd/pwd.c index 0009669645b..eaee02b76f0 100644 --- a/bin/pwd/pwd.c +++ b/bin/pwd/pwd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pwd.c,v 1.12 2014/05/28 06:55:58 guenther Exp $ */ +/* $OpenBSD: pwd.c,v 1.13 2015/10/05 05:24:12 deraadt Exp $ */ /* $NetBSD: pwd.c,v 1.22 2011/08/29 14:51:19 joerg Exp $ */ /* @@ -47,6 +47,9 @@ main(int argc, char *argv[]) int ch, lFlag = 0; const char *p; + if (tame("stdio rpath", NULL) == -1) + err(1, "tame"); + while ((ch = getopt(argc, argv, "LP")) != -1) { switch (ch) { case 'L': |