aboutsummaryrefslogtreecommitdiff
path: root/sftp.c
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2021-02-14 21:09:58 +0000
committerEd Maste <emaste@FreeBSD.org>2021-02-14 21:09:58 +0000
commit3bbd8dc96b4466d8e4f850fc0adf7d02e1df2dc7 (patch)
tree755d79f61bc5fe47efc42cd39ac819b2a5cd9390 /sftp.c
parentdb903103f46785ea0bba0f228691e1f8fb3a643d (diff)
Vendor import of OpenSSH 8.4p1vendor/openssh/8.4p1
Diffstat (limited to 'sftp.c')
-rw-r--r--sftp.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sftp.c b/sftp.c
index 2799e4a109bd..c88c861185be 100644
--- a/sftp.c
+++ b/sftp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp.c,v 1.200 2020/04/03 05:53:52 jmc Exp $ */
+/* $OpenBSD: sftp.c,v 1.201 2020/08/03 02:43:41 djm Exp $ */
/*
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
*
@@ -2363,7 +2363,7 @@ usage(void)
extern char *__progname;
fprintf(stderr,
- "usage: %s [-46aCfNpqrv] [-B buffer_size] [-b batchfile] [-c cipher]\n"
+ "usage: %s [-46AaCfNpqrv] [-B buffer_size] [-b batchfile] [-c cipher]\n"
" [-D sftp_server_path] [-F ssh_config] [-i identity_file]\n"
" [-J destination] [-l limit] [-o ssh_option] [-P port]\n"
" [-R num_requests] [-S program] [-s subsystem | sftp_server]\n"
@@ -2401,7 +2401,6 @@ main(int argc, char **argv)
args.list = NULL;
addargs(&args, "%s", ssh_program);
addargs(&args, "-oForwardX11 no");
- addargs(&args, "-oForwardAgent no");
addargs(&args, "-oPermitLocalCommand no");
addargs(&args, "-oClearAllForwardings yes");
@@ -2409,9 +2408,10 @@ main(int argc, char **argv)
infile = stdin;
while ((ch = getopt(argc, argv,
- "1246afhNpqrvCc:D:i:l:o:s:S:b:B:F:J:P:R:")) != -1) {
+ "1246AafhNpqrvCc:D:i:l:o:s:S:b:B:F:J:P:R:")) != -1) {
switch (ch) {
/* Passed through to ssh(1) */
+ case 'A':
case '4':
case '6':
case 'C':
@@ -2511,6 +2511,9 @@ main(int argc, char **argv)
}
}
+ /* Do this last because we want the user to be able to override it */
+ addargs(&args, "-oForwardAgent no");
+
if (!isatty(STDERR_FILENO))
showprogress = 0;