diff options
Diffstat (limited to 'sftp.c')
-rw-r--r-- | sftp.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sftp.c,v 1.200 2020/04/03 05:53:52 jmc Exp $ */ | 1 | /* $OpenBSD: sftp.c,v 1.201 2020/08/03 02:43:41 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> | 3 | * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> |
4 | * | 4 | * |
@@ -2363,7 +2363,7 @@ usage(void) | |||
2363 | extern char *__progname; | 2363 | extern char *__progname; |
2364 | 2364 | ||
2365 | fprintf(stderr, | 2365 | fprintf(stderr, |
2366 | "usage: %s [-46aCfNpqrv] [-B buffer_size] [-b batchfile] [-c cipher]\n" | 2366 | "usage: %s [-46AaCfNpqrv] [-B buffer_size] [-b batchfile] [-c cipher]\n" |
2367 | " [-D sftp_server_path] [-F ssh_config] [-i identity_file]\n" | 2367 | " [-D sftp_server_path] [-F ssh_config] [-i identity_file]\n" |
2368 | " [-J destination] [-l limit] [-o ssh_option] [-P port]\n" | 2368 | " [-J destination] [-l limit] [-o ssh_option] [-P port]\n" |
2369 | " [-R num_requests] [-S program] [-s subsystem | sftp_server]\n" | 2369 | " [-R num_requests] [-S program] [-s subsystem | sftp_server]\n" |
@@ -2401,7 +2401,6 @@ main(int argc, char **argv) | |||
2401 | args.list = NULL; | 2401 | args.list = NULL; |
2402 | addargs(&args, "%s", ssh_program); | 2402 | addargs(&args, "%s", ssh_program); |
2403 | addargs(&args, "-oForwardX11 no"); | 2403 | addargs(&args, "-oForwardX11 no"); |
2404 | addargs(&args, "-oForwardAgent no"); | ||
2405 | addargs(&args, "-oPermitLocalCommand no"); | 2404 | addargs(&args, "-oPermitLocalCommand no"); |
2406 | addargs(&args, "-oClearAllForwardings yes"); | 2405 | addargs(&args, "-oClearAllForwardings yes"); |
2407 | 2406 | ||
@@ -2409,9 +2408,10 @@ main(int argc, char **argv) | |||
2409 | infile = stdin; | 2408 | infile = stdin; |
2410 | 2409 | ||
2411 | while ((ch = getopt(argc, argv, | 2410 | while ((ch = getopt(argc, argv, |
2412 | "1246afhNpqrvCc:D:i:l:o:s:S:b:B:F:J:P:R:")) != -1) { | 2411 | "1246AafhNpqrvCc:D:i:l:o:s:S:b:B:F:J:P:R:")) != -1) { |
2413 | switch (ch) { | 2412 | switch (ch) { |
2414 | /* Passed through to ssh(1) */ | 2413 | /* Passed through to ssh(1) */ |
2414 | case 'A': | ||
2415 | case '4': | 2415 | case '4': |
2416 | case '6': | 2416 | case '6': |
2417 | case 'C': | 2417 | case 'C': |
@@ -2511,6 +2511,9 @@ main(int argc, char **argv) | |||
2511 | } | 2511 | } |
2512 | } | 2512 | } |
2513 | 2513 | ||
2514 | /* Do this last because we want the user to be able to override it */ | ||
2515 | addargs(&args, "-oForwardAgent no"); | ||
2516 | |||
2514 | if (!isatty(STDERR_FILENO)) | 2517 | if (!isatty(STDERR_FILENO)) |
2515 | showprogress = 0; | 2518 | showprogress = 0; |
2516 | 2519 | ||