summaryrefslogtreecommitdiff
path: root/openssh-6.6.1p1-scp-non-existing-directory.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-10-02 01:13:25 +0000
committerCoprDistGit <infra@openeuler.org>2023-10-02 01:13:25 +0000
commitf38978765535e8c844371dbcd8e2ae1ace135e08 (patch)
tree8f6f73cc41ec340be45959fae67da4c6abec1e21 /openssh-6.6.1p1-scp-non-existing-directory.patch
parent151bd95e0af0e9382ca9065b0d6cc6d62f1ac794 (diff)
automatic import of opensshopeneuler20.03
Diffstat (limited to 'openssh-6.6.1p1-scp-non-existing-directory.patch')
-rw-r--r--openssh-6.6.1p1-scp-non-existing-directory.patch14
1 files changed, 14 insertions, 0 deletions
diff --git a/openssh-6.6.1p1-scp-non-existing-directory.patch b/openssh-6.6.1p1-scp-non-existing-directory.patch
new file mode 100644
index 0000000..bb55c0b
--- /dev/null
+++ b/openssh-6.6.1p1-scp-non-existing-directory.patch
@@ -0,0 +1,14 @@
+--- a/scp.c
++++ a/scp.c
+@@ -1084,6 +1084,10 @@ sink(int argc, char **argv)
+ free(vect[0]);
+ continue;
+ }
++ if (buf[0] == 'C' && ! exists && np[strlen(np)-1] == '/') {
++ errno = ENOTDIR;
++ goto bad;
++ }
+ omode = mode;
+ mode |= S_IWUSR;
+ if ((ofd = open(np, O_WRONLY|O_CREAT, mode)) == -1) {
+--