diff options
-rw-r--r-- | sftp.1 | 10 | ||||
-rw-r--r-- | sftp.c | 12 |
2 files changed, 16 insertions, 6 deletions
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: sftp.1,v 1.128 2019/11/30 07:07:59 jmc Exp $ | 1 | .\" $OpenBSD: sftp.1,v 1.129 2020/04/03 04:34:15 djm Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Copyright (c) 2001 Damien Miller. All rights reserved. | 3 | .\" Copyright (c) 2001 Damien Miller. All rights reserved. |
4 | .\" | 4 | .\" |
@@ -22,7 +22,7 @@ | |||
22 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 22 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
23 | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
24 | .\" | 24 | .\" |
25 | .Dd $Mdocdate: November 30 2019 $ | 25 | .Dd $Mdocdate: April 3 2020 $ |
26 | .Dt SFTP 1 | 26 | .Dt SFTP 1 |
27 | .Os | 27 | .Os |
28 | .Sh NAME | 28 | .Sh NAME |
@@ -30,7 +30,7 @@ | |||
30 | .Nd OpenSSH secure file transfer | 30 | .Nd OpenSSH secure file transfer |
31 | .Sh SYNOPSIS | 31 | .Sh SYNOPSIS |
32 | .Nm sftp | 32 | .Nm sftp |
33 | .Op Fl 46aCfpqrv | 33 | .Op Fl 46aCfNpqrv |
34 | .Op Fl B Ar buffer_size | 34 | .Op Fl B Ar buffer_size |
35 | .Op Fl b Ar batchfile | 35 | .Op Fl b Ar batchfile |
36 | .Op Fl c Ar cipher | 36 | .Op Fl c Ar cipher |
@@ -275,6 +275,10 @@ For full details of the options listed below, and their possible values, see | |||
275 | .El | 275 | .El |
276 | .It Fl P Ar port | 276 | .It Fl P Ar port |
277 | Specifies the port to connect to on the remote host. | 277 | Specifies the port to connect to on the remote host. |
278 | .It Fl N | ||
279 | Disables quiet mode, e.g. to override the implicit quiet mode set by the | ||
280 | .Fl b | ||
281 | flag. | ||
278 | .It Fl p | 282 | .It Fl p |
279 | Preserves modification times, access times, and modes from the | 283 | Preserves modification times, access times, and modes from the |
280 | original files transferred. | 284 | original files transferred. |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sftp.c,v 1.198 2020/02/26 11:46:51 dtucker Exp $ */ | 1 | /* $OpenBSD: sftp.c,v 1.199 2020/04/03 04:34:15 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 | * |
@@ -2375,7 +2375,7 @@ usage(void) | |||
2375 | int | 2375 | int |
2376 | main(int argc, char **argv) | 2376 | main(int argc, char **argv) |
2377 | { | 2377 | { |
2378 | int in, out, ch, err, tmp, port = -1; | 2378 | int in, out, ch, err, tmp, port = -1, noisy = 0; |
2379 | char *host = NULL, *user, *cp, *file2 = NULL; | 2379 | char *host = NULL, *user, *cp, *file2 = NULL; |
2380 | int debug_level = 0; | 2380 | int debug_level = 0; |
2381 | char *file1 = NULL, *sftp_server = NULL; | 2381 | char *file1 = NULL, *sftp_server = NULL; |
@@ -2409,7 +2409,7 @@ main(int argc, char **argv) | |||
2409 | infile = stdin; | 2409 | infile = stdin; |
2410 | 2410 | ||
2411 | while ((ch = getopt(argc, argv, | 2411 | while ((ch = getopt(argc, argv, |
2412 | "1246afhpqrvCc:D:i:l:o:s:S:b:B:F:J:P:R:")) != -1) { | 2412 | "1246afhNpqrvCc:D:i:l:o:s:S:b:B:F:J:P:R:")) != -1) { |
2413 | switch (ch) { | 2413 | switch (ch) { |
2414 | /* Passed through to ssh(1) */ | 2414 | /* Passed through to ssh(1) */ |
2415 | case '4': | 2415 | case '4': |
@@ -2473,6 +2473,9 @@ main(int argc, char **argv) | |||
2473 | case 'f': | 2473 | case 'f': |
2474 | global_fflag = 1; | 2474 | global_fflag = 1; |
2475 | break; | 2475 | break; |
2476 | case 'N': | ||
2477 | noisy = 1; /* Used to clear quiet mode after getopt */ | ||
2478 | break; | ||
2476 | case 'p': | 2479 | case 'p': |
2477 | global_pflag = 1; | 2480 | global_pflag = 1; |
2478 | break; | 2481 | break; |
@@ -2511,6 +2514,9 @@ main(int argc, char **argv) | |||
2511 | if (!isatty(STDERR_FILENO)) | 2514 | if (!isatty(STDERR_FILENO)) |
2512 | showprogress = 0; | 2515 | showprogress = 0; |
2513 | 2516 | ||
2517 | if (noisy) | ||
2518 | quiet = 0; | ||
2519 | |||
2514 | log_init(argv[0], ll, SYSLOG_FACILITY_USER, 1); | 2520 | log_init(argv[0], ll, SYSLOG_FACILITY_USER, 1); |
2515 | 2521 | ||
2516 | if (sftp_direct == NULL) { | 2522 | if (sftp_direct == NULL) { |