From: kn Date: Thu, 30 Nov 2023 14:52:00 +0000 (+0000) Subject: Single file to stdout without "fattr" X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=984d9a508f1fdb040e523c73e9af29e633cfde4c;p=openbsd Single file to stdout without "fattr" Regardless of SMALL and other command flags, 'ftp -o - URL [file|URL ...]' only processes the first URL and exists. Only standard output is written to and modifying 'struct stat' properties as per pledge(2) "fattr" don't apply. OK millert --- diff --git a/usr.bin/ftp/main.c b/usr.bin/ftp/main.c index 93dd47a0b83..53e588efef2 100644 --- a/usr.bin/ftp/main.c +++ b/usr.bin/ftp/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.142 2023/11/30 14:51:32 kn Exp $ */ +/* $OpenBSD: main.c,v 1.143 2023/11/30 14:52:00 kn Exp $ */ /* $NetBSD: main.c,v 1.24 1997/08/18 10:20:26 lukem Exp $ */ /* @@ -616,7 +616,7 @@ main(volatile int argc, char *argv[]) if (argc > 0) { if (isurl(argv[0])) { if (pipeout) { - if (pledge("stdio rpath dns tty inet fattr", + if (pledge("stdio rpath dns tty inet", NULL) == -1) err(1, "pledge"); } else {