From owner-freebsd-current Sun Sep 24 17:25:22 2000 Delivered-To: freebsd-current@freebsd.org Received: from Awfulhak.org (tun.AwfulHak.org [194.242.139.173]) by hub.freebsd.org (Postfix) with ESMTP id 3DC7137B424; Sun, 24 Sep 2000 17:25:13 -0700 (PDT) Received: from hak.lan.Awfulhak.org (root@hak.lan.awfulhak.org [172.16.0.12]) by Awfulhak.org (8.11.0/8.11.0) with ESMTP id e8P0IMC18760; Mon, 25 Sep 2000 01:18:22 +0100 (BST) (envelope-from brian@hak.lan.Awfulhak.org) Received: from hak.lan.Awfulhak.org (brian@localhost [127.0.0.1]) by hak.lan.Awfulhak.org (8.11.0/8.11.0) with ESMTP id e8P0DGx52883; Mon, 25 Sep 2000 01:13:17 +0100 (BST) (envelope-from brian@hak.lan.Awfulhak.org) Message-Id: <200009250013.e8P0DGx52883@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.1.1 10/15/1999 To: kris@FreeBSD.ORG Cc: "Jacques A. Vidrine" , Seigo Tanimura , current@FreeBSD.ORG, brian@Awfulhak.org Subject: Re: pw_class in _pw_passwd is null if __hashpw() is not called in prior In-Reply-To: Message from "Jacques A. Vidrine" of "Sun, 24 Sep 2000 10:08:12 CDT." <20000924100812.A23848@spawn.nectar.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 25 Sep 2000 01:13:14 +0100 From: Brian Somers Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Kris, I guess once this is committed, the patch I sent you for ssh will no longer be necessary. To the cc list: My patch just told ssh to xstrdup(pw_class ? pw_class : "") > On Sun, Sep 24, 2000 at 11:43:01PM +0900, Seigo Tanimura wrote: > > As we are supposed to fill in all of the members in struct passwd > > (like Solaris), _pw_passwd should have its initial value other than > > zero. > > > > static struct passwd _pw_passwd = > > { > > "", > > "", > > (uid_t)0, /* XXX Is zero appropriate? */ > > (gid_t)0, > > (time_t)0, > > "", > > "", > > "", > > "", > > (time_t)0, > > 0, > > }; > > I agree -- it bit me while working on some additional nsswitch > backends. Using a pointer to an empty string would be more safe. As > to the XXX comment, those fields have been 0 forever, no point in > changing them now. Unless objections come up, I'll commit this change > or something similar with the next nsswitch commit. > > Thanks for the suggestion! > -- > Jacques Vidrine / n@nectar.com / jvidrine@verio.net / nectar@FreeBSD.org -- Brian Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message