Blame openssh-6.6.1p1-scp-non-existing-directory.patch
|
Jakub Jelen |
fd06d6 |
--- a/scp.c
|
|
Jakub Jelen |
fd06d6 |
+++ a/scp.c
|
|
Jakub Jelen |
fd06d6 |
@@ -1084,6 +1084,10 @@ sink(int argc, char **argv)
|
|
Jakub Jelen |
fd06d6 |
free(vect[0]);
|
|
Jakub Jelen |
fd06d6 |
continue;
|
|
Jakub Jelen |
fd06d6 |
}
|
|
Jakub Jelen |
fd06d6 |
+ if (buf[0] == 'C' && ! exists && np[strlen(np)-1] == '/') {
|
|
Jakub Jelen |
fd06d6 |
+ errno = ENOTDIR;
|
|
Jakub Jelen |
fd06d6 |
+ goto bad;
|
|
Jakub Jelen |
fd06d6 |
+ }
|
|
Jakub Jelen |
fd06d6 |
omode = mode;
|
|
Jakub Jelen |
fd06d6 |
mode |= S_IWUSR;
|
|
Jakub Jelen |
fd06d6 |
if ((ofd = open(np, O_WRONLY|O_CREAT, mode)) < 0) {
|
|
Jakub Jelen |
fd06d6 |
--
|