Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Sep 2000 10:08:12 -0500
From:      "Jacques A. Vidrine" <n@nectar.com>
To:        Seigo Tanimura <tanimura@r.dl.itc.u-tokyo.ac.jp>
Cc:        current@freebsd.org
Subject:   Re: pw_class in _pw_passwd is null if __hashpw() is not called in prior
Message-ID:  <20000924100812.A23848@spawn.nectar.com>
In-Reply-To: <14798.4853.288090.72159A@silver.carrots.uucp.r.dl.itc.u-tokyo.ac.jp>; from tanimura@r.dl.itc.u-tokyo.ac.jp on Sun, Sep 24, 2000 at 11:43:01PM %2B0900
References:  <20000906151431.A26152@hamlet.nectar.com> <14798.4853.288090.72159A@silver.carrots.uucp.r.dl.itc.u-tokyo.ac.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
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


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?20000924100812.A23848>