Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Sep 2000 01:13:14 +0100
From:      Brian Somers <brian@Awfulhak.org>
To:        kris@FreeBSD.ORG
Cc:        "Jacques A. Vidrine" <n@nectar.com>, Seigo Tanimura <tanimura@r.dl.itc.u-tokyo.ac.jp>, current@FreeBSD.ORG, brian@Awfulhak.org
Subject:   Re: pw_class in _pw_passwd is null if __hashpw() is not called in prior 
Message-ID:  <200009250013.e8P0DGx52883@hak.lan.Awfulhak.org>
In-Reply-To: Message from "Jacques A. Vidrine" <n@nectar.com>  of "Sun, 24 Sep 2000 10:08:12 CDT." <20000924100812.A23848@spawn.nectar.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
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 <brian@Awfulhak.org>                        <brian@[uk.]FreeBSD.org>
      <http://www.Awfulhak.org>;                   <brian@[uk.]OpenBSD.org>
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200009250013.e8P0DGx52883>