From 8ca43f867673bd45b2904926fce16e83b98ada75 Mon Sep 17 00:00:00 2001 From: kn Date: Sat, 23 Dec 2023 23:03:00 +0000 Subject: [PATCH] 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 --- usr.bin/ftp/main.c | 4 ++-- 1 file 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"); -- 2.20.1