Date: Tue, 1 Aug 2000 07:00:14 -0700 (PDT) From: Sheldon Hearn <sheldonh@uunet.co.za> To: freebsd-bugs@FreeBSD.org Subject: Re: misc/20333: ftp login fails on unix password when s/key active but not required Message-ID: <200008011400.HAA54328@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR misc/20333; it has been noted by GNATS. From: Sheldon Hearn <sheldonh@uunet.co.za> To: pscott@the-frontier.org Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: misc/20333: ftp login fails on unix password when s/key active but not required Date: Tue, 01 Aug 2000 15:53:21 +0200 On Tue, 01 Aug 2000 15:21:51 +0200, Sheldon Hearn wrote: > The following patch to ftpd.c fixes this for the NOPAM case, but there's > still breakage in the libpam skey module. Please use the following patch instead. Ciao, Sheldon. Index: ftpd.c =================================================================== RCS file: /home/ncvs/src/libexec/ftpd/ftpd.c,v retrieving revision 1.64 diff -u -d -r1.64 ftpd.c --- ftpd.c 2000/06/26 05:36:09 1.64 +++ ftpd.c 2000/08/01 13:49:08 @@ -1188,9 +1210,12 @@ goto skip; #endif #ifdef SKEY - rval = strcmp(skey_crypt(passwd, pw->pw_passwd, pw, pwok), - pw->pw_passwd); - pwok = 0; + if (pwok) + rval = strcmp(pw->pw_passwd, + crypt(passwd, pw->pw_passwd)); + if (rval) + rval = strcmp(pw->pw_passwd, + skey_crypt(passwd, pw->pw_passwd, pw, pwok)); #else rval = strcmp(crypt(passwd, pw->pw_passwd), pw->pw_passwd); #endif @@ -1220,6 +1245,9 @@ return; } } +#ifdef SKEY + pwok = 0; +#endif login_attempts = 0; /* this time successful */ if (setegid((gid_t)pw->pw_gid) < 0) { reply(550, "Can't set gid."); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200008011400.HAA54328>