diff options
author | djm@openbsd.org <djm@openbsd.org> | 2021-08-07 02:12:09 +0200 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2021-08-07 02:20:31 +0200 |
commit | 7b1cbcb7599d9f6a3bbad79d412604aa1203b5ee (patch) | |
tree | 77a90151569f40b2b0ccc8874aa326615489733e /sftp.c | |
parent | upstream: fix incorrect directory permissions on scp -3 (diff) | |
download | openssh-7b1cbcb7599d9f6a3bbad79d412604aa1203b5ee.tar.xz openssh-7b1cbcb7599d9f6a3bbad79d412604aa1203b5ee.zip |
upstream: make scp(1) in SFTP mode follow symlinks like
traditional scp(1) ok markus@
OpenBSD-Commit-ID: 97255e55be37e8e26605e4ba1e69f9781765d231
Diffstat (limited to 'sftp.c')
-rw-r--r-- | sftp.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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> * @@ -655,10 +655,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, @@ -748,10 +749,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, |