[PATCH]: Port of openssh-2.1.0p3 to Cygwin environment

Corinna Vinschen corinna at vinschen.de
Sat Jun 10 05:46:09 EST 2000


Damien Miller wrote:
> > - Care for all file access to differ `text mode' (files may have
> >   \n or \r\n line endings) from `binary mode' (files are always
> >   read as they are like in U*X).
> 
> This is the main problem with integrating the patch - it touched
> just about every open and fopen in the source. This make it more
> difficult to stay synched with the OpenBSD CVS tree (i.e lots more
> manual patching).
> 
> Is there any way to decrease the volume of these changes or isolate
> them to a one-off #define?

The problem is, that some files has to be opened as `text files'
(motd, sshd_config, etc) and some files has to be opened
as `binary files' (utmp, identity, etc) so there's no chance to
generalize the open mode.

You may have seen, that there's a difference in the implementation:

open(2) calls in OpenSSH are in general with mode O_BINARY so
this is in fact a generalization which should be easy to handle
in the ported version. For all OSes, which hasn't defined
O_BINARY, O_BINARY is set to 0 (includes.h).

The difficulty is given in the fopen(3) calls. I don't have
a generalization yet instantly. Has somebody else an idea?

> I will give the diff a try over the weekend on our poor NT machine :)

Fine.

Corinna

-- 
Corinna Vinschen
Cygwin Developer
Cygnus Solutions, a Red Hat company





More information about the openssh-unix-dev mailing list