summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlemens Nanni <kn@cvs.openbsd.org>2023-12-23 23:03:01 +0000
committerKlemens Nanni <kn@cvs.openbsd.org>2023-12-23 23:03:01 +0000
commitc3906d0f8216a643c08012c6e61a34be31804729 (patch)
tree7dbc75e7e4cea1585815c134d486e35e01e19610
parent16fab643bdac3aea9e6fc751331061f8be8f5f04 (diff)
Relax -C pledge to unbreak shelling out in interactive mode
r1.69 introduced -C in 2008 "to continue multiple transfers"; 'ftp -C ftp://ftp.eu.openbsd.org/' lands in "ftp> " and turns "mget" into "reget" by default. r1.139 -C/resume without "proc exec" thusly was too strict. Instead, now after recent cleanups/tweaks, prevent execution with -o. OK millert
-rw-r--r--usr.bin/ftp/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ftp/main.c b/usr.bin/ftp/main.c
index a104bdba03d..14758450aef 100644
--- a/usr.bin/ftp/main.c
+++ b/usr.bin/ftp/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.145 2023/12/15 10:28:57 kn Exp $ */
+/* $OpenBSD: main.c,v 1.146 2023/12/23 23:03:00 kn Exp $ */
/* $NetBSD: main.c,v 1.24 1997/08/18 10:20:26 lukem Exp $ */
/*
@@ -615,7 +615,7 @@ main(volatile int argc, char *argv[])
err(1, "pledge");
} else {
#ifndef SMALL
- if (!resume) {
+ if (outfile == NULL) {
if (pledge("stdio rpath wpath cpath dns tty inet proc exec fattr",
NULL) == -1)
err(1, "pledge");