Piping single file to standard out needs no "proc exec"
authorkn <kn@openbsd.org>
Wed, 22 Nov 2023 02:20:54 +0000 (02:20 +0000)
committerkn <kn@openbsd.org>
Wed, 22 Nov 2023 02:20:54 +0000 (02:20 +0000)
'-o -' now means no "ftp> " shell, so no "|some cmd" files, "!some cmd" or
"page" commands.

OK millert

usr.bin/ftp/main.c

index 2a62fba..75d184e 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: main.c,v 1.140 2023/11/22 02:16:20 kn Exp $   */
+/*     $OpenBSD: main.c,v 1.141 2023/11/22 02:20:54 kn Exp $   */
 /*     $NetBSD: main.c,v 1.24 1997/08/18 10:20:26 lukem Exp $  */
 
 /*
@@ -618,7 +618,7 @@ main(volatile int argc, char *argv[])
                        if (pipeout) {
 #ifndef SMALL
                            if (!resume) {
-                               if (pledge("stdio rpath dns tty inet proc exec fattr",
+                               if (pledge("stdio rpath dns tty inet fattr",
                                    NULL) == -1)
                                        err(1, "pledge");
                            } else