Corinna Vinschen
2001-Feb-28 15:54 UTC
[PATCH]: auth.c (pwcopy): Copy pw_gecos field when build for Cygwin
Hi, the attached patch is very important for Cygwin. I don't know how I could have missed that for months now :-( I hope this can be included in 2.5.1p2. The pw_gecos field in Cygwin's /etc/passwd contains Windows specific authentication informations which let NT domain users logon to a machine without the need to inform the logon server (sshd in our case) about the name of the NT domain. As a side effect you can have a different name under Cygwin than your NT account name. Unfortunately, without copying pw_gecos this functionality is completely broken in sshd. The patch: Index: auth.c ==================================================================RCS file: /cvs/openssh_cvs/auth.c,v retrieving revision 1.23 diff -u -p -r1.23 auth.c --- auth.c 2001/02/15 03:08:27 1.23 +++ auth.c 2001/02/28 15:47:23 @@ -182,6 +182,9 @@ pwcopy(struct passwd *pw) #ifdef HAVE_PW_CLASS_IN_PASSWD copy->pw_class = xstrdup(pw->pw_class); #endif +#ifdef HAVE_CYGWIN + copy->pw_gecos = xstrdup(pw->pw_gecos); +#endif copy->pw_dir = xstrdup(pw->pw_dir); copy->pw_shell = xstrdup(pw->pw_shell); return copy; Thanks in advance, Corinna -- Corinna Vinschen Cygwin Developer Red Hat, Inc. mailto:vinschen at redhat.com
Damien Miller
2001-Feb-28 22:48 UTC
[PATCH]: auth.c (pwcopy): Copy pw_gecos field when build for Cygwin
On Wed, 28 Feb 2001, Corinna Vinschen wrote:> Hi, > > the attached patch is very important for Cygwin. I don't know > how I could have missed that for months now :-( I hope this > can be included in 2.5.1p2.Applied. -d -- | Damien Miller <djm at mindrot.org> \ ``E-mail attachments are the poor man's | http://www.mindrot.org / distributed filesystem'' - Dan Geer
mouring at etoh.eviladmin.org
2001-Mar-03 22:07 UTC
[PATCH]: auth.c (pwcopy): Copy pw_gecos field when build for Cygwin
On Wed, 28 Feb 2001, Corinna Vinschen wrote:> Hi, > > the attached patch is very important for Cygwin. I don't know > how I could have missed that for months now :-( I hope this > can be included in 2.5.1p2. > > The pw_gecos field in Cygwin's /etc/passwd contains Windows > specific authentication informations which let NT domain > users logon to a machine without the need to inform the > logon server (sshd in our case) about the name of the NT domain. > As a side effect you can have a different name under Cygwin than > your NT account name. > > Unfortunately, without copying pw_gecos this functionality is > completely broken in sshd. >pw_gecos is done by defeault in the OpenBSD source.. Any reason why we can't just get rid of the #ifdef and allow this for all platforms? - Ben
Maybe Matching Threads
- OpenSSH changes for BSD/OS
- pw_expire/pw_change in current portable openssh CVS bombs
- fakepw auth.c question
- [Bug 298] New: sshd fails to set user context, preventing all logins, also setgroups is failing
- [PATCH] Fix login.conf, expiration, BSD compatibility in OpenSSH