summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-10-18 03:39:37 +0000
committerderaadt <deraadt@openbsd.org>2015-10-18 03:39:37 +0000
commit8d84ca39822d4ed30d52b2d54a9ce38004e75be5 (patch)
tree1ce0538c0f368620d157a187c93ff16f2563b432
parentMove your drink further away... When a program pledged "getpw" fails to (diff)
downloadwireguard-openbsd-8d84ca39822d4ed30d52b2d54a9ce38004e75be5.tar.xz
wireguard-openbsd-8d84ca39822d4ed30d52b2d54a9ce38004e75be5.zip
First casualty of making pledge "dns" mandatory for dns users.
"dns" was missing, and this was relying on "inet" support..
-rw-r--r--usr.bin/ftp/main.c10
-rw-r--r--usr.bin/ftp/util.c5
2 files changed, 7 insertions, 8 deletions
diff --git a/usr.bin/ftp/main.c b/usr.bin/ftp/main.c
index 6b7dc346fd1..6fa66f18fbe 100644
--- a/usr.bin/ftp/main.c
+++ b/usr.bin/ftp/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.103 2015/10/16 05:35:19 doug Exp $ */
+/* $OpenBSD: main.c,v 1.104 2015/10/18 03:39:37 deraadt Exp $ */
/* $NetBSD: main.c,v 1.24 1997/08/18 10:20:26 lukem Exp $ */
/*
@@ -444,21 +444,21 @@ main(volatile int argc, char *argv[])
if (isurl(argv[0])) {
if (pipeout) {
#ifndef SMALL
- if (pledge("stdio rpath tty inet fattr",
+ if (pledge("stdio rpath dns tty inet fattr",
NULL) == -1)
err(1, "pledge");
#else
- if (pledge("stdio rpath tty inet proc exec fattr",
+ if (pledge("stdio rpath dns tty inet proc exec fattr",
NULL) == -1)
err(1, "pledge");
#endif
} else {
#ifndef SMALL
- if (pledge("stdio rpath wpath cpath tty inet fattr",
+ if (pledge("stdio rpath wpath cpath dns tty inet fattr",
NULL) == -1)
err(1, "pledge");
#else
- if (pledge("stdio rpath wpath cpath tty inet proc exec fattr",
+ if (pledge("stdio rpath wpath cpath dns tty inet proc exec fattr",
NULL) == -1)
err(1, "pledge");
#endif
diff --git a/usr.bin/ftp/util.c b/usr.bin/ftp/util.c
index 7d2d9dd3807..14c4da0f361 100644
--- a/usr.bin/ftp/util.c
+++ b/usr.bin/ftp/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.73 2015/10/18 03:04:11 mmcc Exp $ */
+/* $OpenBSD: util.c,v 1.74 2015/10/18 03:39:37 deraadt Exp $ */
/* $NetBSD: util.c,v 1.12 1997/08/18 10:20:27 lukem Exp $ */
/*-
@@ -390,8 +390,7 @@ remglob2(char *argv[], int doswitch, char **errbuf, FILE **ftemp, char *type)
if (*ftemp == NULL) {
int len;
- if ((cp = getenv("TMPDIR")) == NULL || *cp == '\0')
- cp = _PATH_TMP;
+ cp = _PATH_TMP;
len = strlen(cp);
if (len + sizeof(TMPFILE) + (cp[len-1] != '/') > sizeof(temp)) {
warnx("unable to create temporary file: %s",