rutwa189 / rpms / openssh

Forked from rpms/openssh a year ago
Clone

Blame SOURCES/openssh-6.6.1p1-scp-non-existing-directory.patch

9070b3
--- a/scp.c	
9070b3
+++ a/scp.c	
9070b3
@@ -1084,6 +1084,10 @@ sink(int argc, char **argv)
9070b3
 			free(vect[0]);
9070b3
 			continue;
9070b3
 		}
9070b3
+		if (buf[0] == 'C' && ! exists && np[strlen(np)-1] == '/') {
9070b3
+			errno = ENOTDIR;
9070b3
+			goto bad;
9070b3
+		}
9070b3
 		omode = mode;
9070b3
 		mode |= S_IWUSR;
9070b3
 		if ((ofd = open(np, O_WRONLY|O_CREAT, mode)) == -1) {
9070b3
--