[PATCH]: auth.c (pwcopy): Copy pw_gecos field when build for Cygwin
Corinna Vinschen
vinschen at redhat.com
Thu Mar 1 02:54:43 EST 2001
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
More information about the openssh-unix-dev
mailing list