diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2021-08-07 00:12:10 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2021-08-07 00:12:10 +0000 |
commit | acdcf31cdd76553d7ee8dd25282815738b279ab6 (patch) | |
tree | 028205b62601bf19f6026f700f8dd01460941155 /usr.bin/ssh/sftp.c | |
parent | 45cf9b23f72d035217835d5d5a7a252bbcde83da (diff) |
make scp(1) in SFTP mode follow symlinks like traditional scp(1)
ok markus@
Diffstat (limited to 'usr.bin/ssh/sftp.c')
-rw-r--r-- | usr.bin/ssh/sftp.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/ssh/sftp.c b/usr.bin/ssh/sftp.c index 69ba7ae7bb1..7a82302858f 100644 --- a/usr.bin/ssh/sftp.c +++ b/usr.bin/ssh/sftp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp.c,v 1.209 2021/04/03 06:58:30 djm Exp $ */ +/* $OpenBSD: sftp.c,v 1.210 2021/08/07 00:12:09 djm Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> * @@ -633,10 +633,11 @@ process_get(struct sftp_conn *conn, const char *src, const char *dst, else if (!quiet && !resume) mprintf("Fetching %s to %s\n", g.gl_pathv[i], abs_dst); + /* XXX follow link flag */ if (globpath_is_dir(g.gl_pathv[i]) && (rflag || global_rflag)) { if (download_dir(conn, g.gl_pathv[i], abs_dst, NULL, pflag || global_pflag, 1, resume, - fflag || global_fflag) == -1) + fflag || global_fflag, 0) == -1) err = -1; } else { if (do_download(conn, g.gl_pathv[i], abs_dst, NULL, @@ -726,10 +727,11 @@ process_put(struct sftp_conn *conn, const char *src, const char *dst, else if (!quiet && !resume) mprintf("Uploading %s to %s\n", g.gl_pathv[i], abs_dst); + /* XXX follow_link_flag */ if (globpath_is_dir(g.gl_pathv[i]) && (rflag || global_rflag)) { if (upload_dir(conn, g.gl_pathv[i], abs_dst, pflag || global_pflag, 1, resume, - fflag || global_fflag) == -1) + fflag || global_fflag, 0) == -1) err = -1; } else { if (do_upload(conn, g.gl_pathv[i], abs_dst, |