summaryrefslogtreecommitdiff
path: root/backport-openssh-6.6.1p1-scp-non-existing-directory.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-07-03 02:42:38 +0000
committerCoprDistGit <infra@openeuler.org>2024-07-03 02:42:38 +0000
commit3c362eae690284f325824e38431881825e32ffdd (patch)
treed2d0e11b92bf88d35c270559d268845d391a4703 /backport-openssh-6.6.1p1-scp-non-existing-directory.patch
parent62f0a34c39a6846b6a86f2bbc7fb8c319bd46d94 (diff)
automatic import of openssh
Diffstat (limited to 'backport-openssh-6.6.1p1-scp-non-existing-directory.patch')
-rw-r--r--backport-openssh-6.6.1p1-scp-non-existing-directory.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/backport-openssh-6.6.1p1-scp-non-existing-directory.patch b/backport-openssh-6.6.1p1-scp-non-existing-directory.patch
new file mode 100644
index 0000000..9e45ae6
--- /dev/null
+++ b/backport-openssh-6.6.1p1-scp-non-existing-directory.patch
@@ -0,0 +1,15 @@
+--- a/scp.c
++++ a/scp.c
+Reference:https://src.fedoraproject.org/rpms/openssh/blob/rawhide/f/backport-openssh-6.6.1p1-scp-non-existing-directory.patch
+@@ -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) {
+--