public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RE: OpenSSH patches dealing with incorrect pathing
@ 2001-08-09  7:37 Mark Bradshaw
  2001-08-09  7:53 ` Corinna Vinschen
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Bradshaw @ 2001-08-09  7:37 UTC (permalink / raw)
  To: 'Corinna Vinschen'

You know, after thinking about it you're probably right.  Hold off on
submitting the patches to the openssh-dev list if you haven't already done
it.  I'll submit them myself.

Mark

> -----Original Message-----
> From: Corinna Vinschen [ mailto:cygwin@cygwin.com ]
> Sent: Thursday, August 09, 2001 10:16 AM
> To: cygwin
> Subject: Re: OpenSSH patches dealing with incorrect pathing
> 
> 
> On Thu, Aug 09, 2001 at 09:15:35AM -0400, Mark Bradshaw wrote:
> > 3)  You fix things faster than they do.  I wanted to make 
> sure you were
> > aware of the problem.
> 
> I've already brought that problem to Markus attention but it's
> not that important for two reasons.
> - It doesn't fail on U*X systems.
> - Nobody should have / as home dir.
> 
> > If you'd rather I just right to the OpenSSH dev list let me 
> know, and I'll
> > quit bothering you.
> 
> Naah, it's just that I was curious. I can't even remember a mail
> from you on openssh-unix-dev so I thought I should ask.
> 
> However, if you'd like to provide patches to a project it's not that
> bad to do it by yourself. Personally I wouldn't like to let another
> person introduce _my_ patches.
> 
> Corinna
> 
> -- 
> Corinna Vinschen                  Please, send mails 
> regarding Cygwin to
> Cygwin Developer                                
> mailto:cygwin@cygwin.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/
> 

--
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/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: OpenSSH patches dealing with incorrect pathing
  2001-08-09  7:37 OpenSSH patches dealing with incorrect pathing Mark Bradshaw
@ 2001-08-09  7:53 ` Corinna Vinschen
  0 siblings, 0 replies; 6+ messages in thread
From: Corinna Vinschen @ 2001-08-09  7:53 UTC (permalink / raw)
  To: cygwin

On Thu, Aug 09, 2001 at 10:37:30AM -0400, Mark Bradshaw wrote:
> You know, after thinking about it you're probably right.  Hold off on
> submitting the patches to the openssh-dev list if you haven't already done
> it.  I'll submit them myself.

Yep. Of course I will support that patch on openssh-unix-dev if it's
needed for some reason. IIRC the previous patch was ignored for a
while, too, and I had to ask another time to get a reaction.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.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/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: OpenSSH patches dealing with incorrect pathing
  2001-08-09  6:15 Mark Bradshaw
@ 2001-08-09  7:15 ` Corinna Vinschen
  0 siblings, 0 replies; 6+ messages in thread
From: Corinna Vinschen @ 2001-08-09  7:15 UTC (permalink / raw)
  To: cygwin

On Thu, Aug 09, 2001 at 09:15:35AM -0400, Mark Bradshaw wrote:
> 3)  You fix things faster than they do.  I wanted to make sure you were
> aware of the problem.

I've already brought that problem to Markus attention but it's
not that important for two reasons.
- It doesn't fail on U*X systems.
- Nobody should have / as home dir.

> If you'd rather I just right to the OpenSSH dev list let me know, and I'll
> quit bothering you.

Naah, it's just that I was curious. I can't even remember a mail
from you on openssh-unix-dev so I thought I should ask.

However, if you'd like to provide patches to a project it's not that
bad to do it by yourself. Personally I wouldn't like to let another
person introduce _my_ patches.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.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/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: OpenSSH patches dealing with incorrect pathing
@ 2001-08-09  6:15 Mark Bradshaw
  2001-08-09  7:15 ` Corinna Vinschen
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Bradshaw @ 2001-08-09  6:15 UTC (permalink / raw)
  To: 'Corinna Vinschen'

Oops.  Darn that line wrap.  Looked okay on my 21 inch monitor!  <GRIN>  New
diff's attached.

Yeah, I'm on the openssh dev list, but I wanted you to look the patches over
first for a couple of reasons.  
1)  It's always better to have a second set of eyeballs on the problem (and
patch), and what better set than yours.  I'm not aware of anyone who has
done more to get OpenSSH on Windows than you (willing to be corrected here).

2)  The OpenSSH people are used to seeing patches come from you, so I
figured it would go down easier if you sent it.  
3)  You fix things faster than they do.  I wanted to make sure you were
aware of the problem.

If you'd rather I just right to the OpenSSH dev list let me know, and I'll
quit bothering you.

Mark

> -----Original Message-----
> From: Corinna Vinschen [ mailto:cygwin@cygwin.com ]
> Sent: Thursday, August 09, 2001 4:59 AM
> To: Mark Bradshaw
> Cc: cygwin
> Subject: Re: OpenSSH patches dealing with incorrect pathing
> 
> 
> On Wed, Aug 08, 2001 at 06:46:53PM -0400, Mark Bradshaw wrote:
> > [...]
> > As far as I can tell only ssh.c and tildexpand.c need to be 
> patched.  Ssh.c
> > is patched where it tries to create the .ssh directory, and 
> tildexpand.c is
> > patched where it expands the user's home directory (incorrectly).
> > 
> > Mark
> 
> Thanks for these patches. Unfortunately they aren't ok since you seem
> to have them pasted(?) into your mail so the patches are broken at...
> 
> > ================================================
> > diff for ssh.c
> > 
> > --- /usr/src/openssh-2.9p2-3/ssh.c	Tue Apr 17 14:14:35 2001
> > +++ ssh-new.c	Wed Aug  8 18:36:18 2001
> > @@ -680,7 +680,7 @@ main(int ac, char **av)
> >  	 * Now that we are back to our own permissions, create ~/.ssh
> >  	 * directory if it doesn\'t already exist.
> >  	 */
> > -	snprintf(buf, sizeof buf, "%.100s/%.100s", pw->pw_dir,
> > _PATH_SSH_USER_DIR);
> > +	snprintf(buf, sizeof buf, "%.100s%s%.100s", pw->pw_dir,
> > strcmp(pw->pw_dir, "/") ? "/" : "", _PATH_SSH_USER_DIR);
> 
> ...that point and at...
> 
> >  	if (stat(buf, &st) < 0)
> >  		if (mkdir(buf, 0700) < 0)
> >  			error("Could not create directory 
> '%.200s'.", buf);
> > 
> > =================================================
> > diff for tildexpand.c
> > 
> > --- /usr/src/openssh-2.9p2-3/tildexpand.c	Thu Feb  8 21:11:25 2001
> > +++ tildexpand-new.c	Wed Aug  8 18:37:45 2001
> > @@ -67,6 +67,6 @@ tilde_expand_filename(const char *filena
> >  	if (len > MAXPATHLEN)
> >  		fatal("Home directory too long (%d > %d", len-1,
> > MAXPATHLEN-1);
> >  	expanded = xmalloc(len);
> > -	snprintf(expanded, len, "%s/%s", pw->pw_dir, cp + 1);
> > +	snprintf(expanded, len, "%s%s%s", pw->pw_dir, strcmp(pw->pw_dir,
> > "/") ? "/" : "", cp + 1);
>   
> ...that point. Please send both patches together in one single 
> attached file so that they immediately apply using `patch'.
> I will forward them to the OpenSSH developers list then.
> 
> BTW, aren't you subscribed to the openssh-unix-dev mailing list?
> I'm under the impression it could be of interest for you.
> 
> Corinna
> 
> -- 
> Corinna Vinschen                  Please, send mails 
> regarding Cygwin to
> Cygwin Developer                                
> mailto:cygwin@cygwin.com
> Red Hat, Inc.
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: OpenSSH patches dealing with incorrect pathing
  2001-08-08 15:46 Mark Bradshaw
@ 2001-08-09  1:58 ` Corinna Vinschen
  0 siblings, 0 replies; 6+ messages in thread
From: Corinna Vinschen @ 2001-08-09  1:58 UTC (permalink / raw)
  To: Mark Bradshaw; +Cc: cygwin

On Wed, Aug 08, 2001 at 06:46:53PM -0400, Mark Bradshaw wrote:
> [...]
> As far as I can tell only ssh.c and tildexpand.c need to be patched.  Ssh.c
> is patched where it tries to create the .ssh directory, and tildexpand.c is
> patched where it expands the user's home directory (incorrectly).
> 
> Mark

Thanks for these patches. Unfortunately they aren't ok since you seem
to have them pasted(?) into your mail so the patches are broken at...

> ================================================
> diff for ssh.c
> 
> --- /usr/src/openssh-2.9p2-3/ssh.c	Tue Apr 17 14:14:35 2001
> +++ ssh-new.c	Wed Aug  8 18:36:18 2001
> @@ -680,7 +680,7 @@ main(int ac, char **av)
>  	 * Now that we are back to our own permissions, create ~/.ssh
>  	 * directory if it doesn\'t already exist.
>  	 */
> -	snprintf(buf, sizeof buf, "%.100s/%.100s", pw->pw_dir,
> _PATH_SSH_USER_DIR);
> +	snprintf(buf, sizeof buf, "%.100s%s%.100s", pw->pw_dir,
> strcmp(pw->pw_dir, "/") ? "/" : "", _PATH_SSH_USER_DIR);

...that point and at...

>  	if (stat(buf, &st) < 0)
>  		if (mkdir(buf, 0700) < 0)
>  			error("Could not create directory '%.200s'.", buf);
> 
> =================================================
> diff for tildexpand.c
> 
> --- /usr/src/openssh-2.9p2-3/tildexpand.c	Thu Feb  8 21:11:25 2001
> +++ tildexpand-new.c	Wed Aug  8 18:37:45 2001
> @@ -67,6 +67,6 @@ tilde_expand_filename(const char *filena
>  	if (len > MAXPATHLEN)
>  		fatal("Home directory too long (%d > %d", len-1,
> MAXPATHLEN-1);
>  	expanded = xmalloc(len);
> -	snprintf(expanded, len, "%s/%s", pw->pw_dir, cp + 1);
> +	snprintf(expanded, len, "%s%s%s", pw->pw_dir, strcmp(pw->pw_dir,
> "/") ? "/" : "", cp + 1);
  
...that point. Please send both patches together in one single 
attached file so that they immediately apply using `patch'.
I will forward them to the OpenSSH developers list then.

BTW, aren't you subscribed to the openssh-unix-dev mailing list?
I'm under the impression it could be of interest for you.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.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/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* OpenSSH patches dealing with incorrect pathing
@ 2001-08-08 15:46 Mark Bradshaw
  2001-08-09  1:58 ` Corinna Vinschen
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Bradshaw @ 2001-08-08 15:46 UTC (permalink / raw)
  To: 'Corinna Vinschen'; +Cc: Mark Bradshaw

Corinna,
   I've found a few more pathing issues that I'd like to get patched in
OpenSSH.  I apologize for missing these when we did the last rounds.  I knew
the error existed.  I had just worked around it for so long that I forgot
about it.  <sigh>

Following are two patches that correct bad // pathing problems, like were
seen in the sftp apps.  They aren't (IMHO) as big a deal as the sftp
patches, since they only show up when the user either has no entry in the
passwd file, or has set their home directory to /.  When they do, however,
this causes ssh to try to put known_hosts files in //.ssh, which doesn't
work for some odd reason.  <grin>

As far as I can tell only ssh.c and tildexpand.c need to be patched.  Ssh.c
is patched where it tries to create the .ssh directory, and tildexpand.c is
patched where it expands the user's home directory (incorrectly).

Mark

================================================
diff for ssh.c

--- /usr/src/openssh-2.9p2-3/ssh.c	Tue Apr 17 14:14:35 2001
+++ ssh-new.c	Wed Aug  8 18:36:18 2001
@@ -680,7 +680,7 @@ main(int ac, char **av)
 	 * Now that we are back to our own permissions, create ~/.ssh
 	 * directory if it doesn\'t already exist.
 	 */
-	snprintf(buf, sizeof buf, "%.100s/%.100s", pw->pw_dir,
_PATH_SSH_USER_DIR);
+	snprintf(buf, sizeof buf, "%.100s%s%.100s", pw->pw_dir,
strcmp(pw->pw_dir, "/") ? "/" : "", _PATH_SSH_USER_DIR);
 	if (stat(buf, &st) < 0)
 		if (mkdir(buf, 0700) < 0)
 			error("Could not create directory '%.200s'.", buf);

=================================================
diff for tildexpand.c

--- /usr/src/openssh-2.9p2-3/tildexpand.c	Thu Feb  8 21:11:25 2001
+++ tildexpand-new.c	Wed Aug  8 18:37:45 2001
@@ -67,6 +67,6 @@ tilde_expand_filename(const char *filena
 	if (len > MAXPATHLEN)
 		fatal("Home directory too long (%d > %d", len-1,
MAXPATHLEN-1);
 	expanded = xmalloc(len);
-	snprintf(expanded, len, "%s/%s", pw->pw_dir, cp + 1);
+	snprintf(expanded, len, "%s%s%s", pw->pw_dir, strcmp(pw->pw_dir,
"/") ? "/" : "", cp + 1);
 	return expanded;
 }

==================================================

--
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/

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-08-09  7:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-09  7:37 OpenSSH patches dealing with incorrect pathing Mark Bradshaw
2001-08-09  7:53 ` Corinna Vinschen
  -- strict thread matches above, loose matches on Subject: below --
2001-08-09  6:15 Mark Bradshaw
2001-08-09  7:15 ` Corinna Vinschen
2001-08-08 15:46 Mark Bradshaw
2001-08-09  1:58 ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).