summaryrefslogtreecommitdiffstats
path: root/sftp.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2020-04-03 06:34:15 +0200
committerDamien Miller <djm@mindrot.org>2020-04-03 06:41:28 +0200
commit9cd40b829a5295cc81fbea8c7d632b2478db6274 (patch)
treef8c2b3d892bab8bbe7d761e76735ff76d4b70dcc /sftp.c
parentupstream: chacha20-poly1305 AEAD using libcrypto EVP_chacha20 (diff)
downloadopenssh-9cd40b829a5295cc81fbea8c7d632b2478db6274.tar.xz
openssh-9cd40b829a5295cc81fbea8c7d632b2478db6274.zip
upstream: Add a flag to re-enable verbose output when in batch
mode; requested in bz3135; ok dtucker OpenBSD-Commit-ID: 5ad2ed0e6440562ba9c84b666a5bbddc1afe2e2b
Diffstat (limited to 'sftp.c')
-rw-r--r--sftp.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sftp.c b/sftp.c
index fc809dc6e..2cef84db7 100644
--- a/sftp.c
+++ b/sftp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp.c,v 1.198 2020/02/26 11:46:51 dtucker Exp $ */
+/* $OpenBSD: sftp.c,v 1.199 2020/04/03 04:34:15 djm Exp $ */
/*
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
*
@@ -2375,7 +2375,7 @@ usage(void)
int
main(int argc, char **argv)
{
- int in, out, ch, err, tmp, port = -1;
+ int in, out, ch, err, tmp, port = -1, noisy = 0;
char *host = NULL, *user, *cp, *file2 = NULL;
int debug_level = 0;
char *file1 = NULL, *sftp_server = NULL;
@@ -2409,7 +2409,7 @@ main(int argc, char **argv)
infile = stdin;
while ((ch = getopt(argc, argv,
- "1246afhpqrvCc:D:i:l:o:s:S:b:B:F:J:P:R:")) != -1) {
+ "1246afhNpqrvCc:D:i:l:o:s:S:b:B:F:J:P:R:")) != -1) {
switch (ch) {
/* Passed through to ssh(1) */
case '4':
@@ -2473,6 +2473,9 @@ main(int argc, char **argv)
case 'f':
global_fflag = 1;
break;
+ case 'N':
+ noisy = 1; /* Used to clear quiet mode after getopt */
+ break;
case 'p':
global_pflag = 1;
break;
@@ -2511,6 +2514,9 @@ main(int argc, char **argv)
if (!isatty(STDERR_FILENO))
showprogress = 0;
+ if (noisy)
+ quiet = 0;
+
log_init(argv[0], ll, SYSLOG_FACILITY_USER, 1);
if (sftp_direct == NULL) {