Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Wed, 25 Jul 2001 11:21:54 +0200 From: Corinna Vinschen To: cygwin Subject: Re: SFTP server when / is c:\ Message-ID: <20010725112154.C490@cygbert.vinschen.de> Mail-Followup-To: cygwin References: <911C684A29ACD311921800508B7293BA010A8ACA AT cnmail> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <911C684A29ACD311921800508B7293BA010A8ACA@cnmail>; from bradshaw@staff.crosswalk.com on Tue, Jul 24, 2001 at 04:44:44PM -0400 On Tue, Jul 24, 2001 at 04:44:44PM -0400, Mark Bradshaw wrote: > Sure thing. Here's the update diffs. I have patched your patch slightly to be less intrusive. Your patch to sftp-server.c changed the content of `path' which has been given as parameter. I changed the call to snprintf instead: diff -u -p -r1.34 sftp-server.c --- sftp-server.c 2001/07/04 03:32:33 1.34 +++ sftp-server.c 2001/07/25 08:44:31 @@ -756,8 +756,8 @@ process_readdir(void) stats = xrealloc(stats, nstats * sizeof(Stat)); } /* XXX OVERFLOW ? */ - snprintf(pathname, sizeof pathname, - "%s/%s", path, dp->d_name); + snprintf(pathname, sizeof pathname, "%s%s%s", path, + strcmp(path, "/") ? "/" : "", dp->d_name); if (lstat(pathname, &st) < 0) continue; stat_to_attrib(&st, &(stats[count].attrib)); I have send the patch to the openssh-unix-dev mailing list a few minutes ago. The Cygwin openssh-2.9p2-3 version containg your patch is on sourceware already and will show up on the mirrors at least tomorrow. Thanks for tracking this down and especially for providing a patch! Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:cygwin AT cygwin DOT com Red Hat, Inc. -- 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/