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

Corinna Vinschen vinschen at cygnus.com
Wed Jun 7 11:00:22 EST 2000


Hi all,

I have just successfully ported openssh-2.1.0p3 to Cygwin. As you
may know, Cygwin is a GPLed POSIX layer for Windows OSes.
To be serious: I don't _like_ Windows systems and sometimes I
really hate that STUPID concessions which are necessary when
trying to get U*X software working on Windoze but for some
reason that's exactly the reason, why I love to work on Cygwin!

Porting to Cygwin has two major goals:

- 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).
- Care for Windows NT password authentication method.

Another problem is the usage of the filename `aux.c'. Windows
has some special files (devices) called NUL, AUX, PRN, LPT, CON
and as a holdover from `those good ol' DOS days' :-( it's not
possible to name a regular file eg. "aux", "aux.foo", "foo.aux".
To get rid of that problem, I have renamed the file `aux.c' to
`aux_funcs.c'. You can't see this file name change in my patch
only in `Makefile.in', unfortunately.

With that port, you can use sshd either as service which enables
NT password authentication for each user or as a user bound
daemon which allows RSA/DSA authentication only for exactly that
user due to the NT/W2K authentication restrictions. No such
restriction exists when running sshd under (geez) W95/W98.
Which works.

I would be very glad if it's possible to integrate the patch and
to add Cygwin to the development targets of the portable OpenSSH.

The gzip'd patch file related to 2.1.0p3 is attached.

Please reply to my personal mail address, because I'm not subscribed
to the mailing list.

Thanks in advance,
Corinna


ChangeLog:
20000607
 - Change name of `aux.c' to `aux_funcs.c'. 
 - [auth-password.c auth1.c auth2.c session.c] Include Windows NT
   password authentication.
 - [auth1.c auth2.c] Disable empty password authentication for Cygwin.
 - [Various files] Care for binary versus text mode in file open calls.
 - Disable some file permission checks for Cygwin to
   allow working on FAT file systems.
 - [bsd-daemon.c} When working in daemon mode, let parent process
   sleep a second to avoid a race condition in Cygwin.
 - [defines.h] typedef the types `n_short', `n_long' and `n_time'
   instead of including netinet/in_systm.h for Cygwin.
 - [includes.h] include getopt.h for Cygwin. Define O_BINARY as far as
   it's not already defined.
 - [login.c] Cast -1 to uid_t to avoid compiler warnings.
 - [packet.c] IPTOS_LOWDELAY and IPTOS_THROUGHPUT are defined in Cygwin
   but result in error on W2K.
 - [pty.c] pushing streams modules isn't functional on Windows.
 - [rsa.c] Don't call seed_rng() in Cygwin to avoid race condition in
   daemon mode.
 - [scp.c] Call `tcgetpgrp()' instead of `ioctl(, TIOCGPGRP,) in Cygwin.
 - [session.c] Rearrange environment handling for woring under Windows.
   Close xauthfile imediately to avoid permission problems under
Windows.
   Don't send the `$DISPLAY/unix' stuff to the Cygwin xauth program.
 - [ssh.c] Try more variations of the own name in Cygwin.
 - [ssh.h] Disable declaration of auth_password for Cygwin here.

-- 
Corinna Vinschen
Cygwin Developer
Cygnus Solutions, a Red Hat company
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openssh-2.1.0p3.diff.gz
Type: application/x-gzip
Size: 8982 bytes
Desc: not available
Url : http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20000607/b63f3176/attachment.bin 


More information about the openssh-unix-dev mailing list