From owner-freebsd-bugs Wed Mar 8 7:10: 5 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 0A5DC37C056 for ; Wed, 8 Mar 2000 07:10:03 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id HAA01080; Wed, 8 Mar 2000 07:10:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Date: Wed, 8 Mar 2000 07:10:02 -0800 (PST) Message-Id: <200003081510.HAA01080@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Daniel Hagan Subject: Re: misc/16278: Perl crypt() returns bogus data? Reply-To: Daniel Hagan Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR misc/16278; it has been noted by GNATS. From: Daniel Hagan To: freebsd-gnats-submit@freebsd.org Cc: racker75@hotmail.com Subject: Re: misc/16278: Perl crypt() returns bogus data? Date: Wed, 8 Mar 2000 10:00:08 -0500 (EST) > Using perl, crypt() returns long, unintelligable values. For example, > the perl installed with 3.3-RELEASE produces these results: > $salt = 'fs'; > $pass = 'heynow'; > $out = crypt($salt, $pass); > print "$out\n"; > returns this: > bash-2.03$ perl test3.pl > $1$heynow$0jPK61iCt92vyGs2ciUUa. man crypt(3) shows that crypt expects crypt(password, salt), not vice-versa. If you switch the arguments you will probably get the correct result. Also, I believe the $1$ at the start indicates that this is a MD5 password, and thus won't necessarily match other crypt() calls (on other UNIXs). Daniel -- Daniel Hagan Computer Science CSE dhagan@cs.vt.edu http://www.cs.vt.edu/~dhagan/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message