Mail Archives: cygwin/2001/07/24/16:55:59
Sure thing. Here's the update diffs.
Mark
--------------------------------
--- /usr/src/openssh-2.9p2-2/sftp-server.c Fri Apr 13 10:28:42 2001
+++ /sftp-server.c Tue Jul 24 16:38:12 2001
@@ -753,6 +753,8 @@ process_readdir(void)
stats = xrealloc(stats, nstats *
sizeof(Stat));
}
/* XXX OVERFLOW ? */
+ if ( strcmp(path, "/") ==0 )
+ path[0] = 0;
snprintf(pathname, sizeof pathname,
"%s/%s", path, dp->d_name);
if (lstat(pathname, &st) < 0)
---------------------------------
--- /usr/src/openssh-2.9p2-2/sftp-int.c Tue May 8 20:39:19 2001
+++ /tmp/openssh-2.9p2/sftp-int.c Tue Jul 24 16:43:34 2001
@@ -204,7 +204,8 @@ path_append(char *p1, char *p2)
ret = xmalloc(len);
strlcpy(ret, p1, len);
- strlcat(ret, "/", len);
+ if ( strcmp(p1,"/") != 0 )
+ strlcat(ret, "/", len);
strlcat(ret, p2, len);
return(ret);
---------------------------------
-----Original Message-----
From: Corinna Vinschen [mailto:cygwin AT cygwin DOT com]
Sent: Tuesday, July 24, 2001 4:31 PM
To: cygwin
Subject: Re: SFTP server when / is c:\
On Tue, Jul 24, 2001 at 03:44:19PM -0400, Mark Bradshaw wrote:
> I appreciate you taking a look at this. I didn't want to start throwing
> stuff onto the openssh developers list without having you give it the
> once-over.
A minor knit. The layout doesn't conform to the used convention.
Could you correct that?
> + if ( strcmp(p1,"/") != 0 ) strlcat(ret, "/", len);
Better
> + if ( strcmp(p1,"/") != 0 )
> + strlcat(ret, "/", len);
and
> + if ( strcmp(path, "/") ==0 ) path[0] = 0;
ditto
> + if ( strcmp(path, "/") ==0 )
> + path[0] = 0;
I will advocate that patch in openssh-unix-dev then.
And probably release an openssh-2.9p2-3 for Cygwin.
Thanks,
Corinna
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -