From owner-freebsd-commit Wed May 24 00:09:27 1995 Return-Path: commit-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id AAA01700 for commit-outgoing; Wed, 24 May 1995 00:09:27 -0700 Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id AAA01687 for cvs-ports-outgoing; Wed, 24 May 1995 00:09:24 -0700 Received: from gndrsh.aac.dev.com (gndrsh.aac.dev.com [198.145.92.241]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id AAA01680 ; Wed, 24 May 1995 00:09:14 -0700 Received: (from rgrimes@localhost) by gndrsh.aac.dev.com (8.6.11/8.6.9) id AAA08617; Wed, 24 May 1995 00:08:53 -0700 From: "Rodney W. Grimes" Message-Id: <199505240708.AAA08617@gndrsh.aac.dev.com> Subject: Re: cvs commit: ports/mail/popper/patches patch-ac To: asami@freefall.cdrom.com (Satoshi Asami) Date: Wed, 24 May 1995 00:08:53 -0700 (PDT) Cc: CVS-commiters@freefall.cdrom.com, cvs-ports@freefall.cdrom.com In-Reply-To: <199505240535.WAA29518@freefall.cdrom.com> from "Satoshi Asami" at May 23, 95 10:35:49 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1120 Sender: commit-owner@FreeBSD.org Precedence: bulk > > asami 95/05/23 22:35:48 > > Added: mail/popper/patches patch-ac > Log: > Make popper work for both DES and MD4 passwords. Basically, just > change one of the error checks from "strlen(.) != 13" to "strlen(.) != > 13 && strlen(.) != 34". > > Submitted by: Martin Renters Code that knows about the length of the password entry in a system should be considered extremly non portable at best, and a violation of data abstraction at worst. The man page for getpwent says: char *pw_passwd; /* encrypted password */ No place in any of the manual pages will you find that the string length of the password string is either 13 or 34 bytes, Poul and I dug all over for this very thing when he wanted to do the MD5 password before it was ever done to make sure we would not be breaking a documented interface. Popper should treat this as a null terminated string of unknown length! -- Rod Grimes rgrimes@gndrsh.aac.dev.com Accurate Automation Company Custom computers for FreeBSD