Date: Wed, 18 Nov 1998 10:48:19 +0100 From: Andre Albsmeier <andre.albsmeier@mchp.siemens.de> To: William McVey <wam@sa.fedex.com> Cc: freebsd-security@FreeBSD.ORG Subject: Re: Would this make FreeBSD more secure? Message-ID: <19981118104819.A1664@internal> In-Reply-To: <199811161838.MAA25024@s07.sa.fedex.com>; from William McVey on Mon, Nov 16, 1998 at 12:38:11PM -0600 References: <199811161838.MAA25024@s07.sa.fedex.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 16-Nov-1998 at 12:38:11 -0600, William McVey wrote:
> [ This is a fairly long reply. The last paragraph has some
> info related to xterm's need for root permissions of possible
> interest. ]
>
> I'm in favor of the proposed change to allow some group (for discussion
> sake, lets call it group 'shadow') read permission to the shadow file.
> Unfortunatly, it's not enough. The getpwnam (and family) needs to be
> modified to base their access method on access to the file as opposed to
> a "root or not-root" check. The routine __initdb() in
> /usr/src/lib/libc/gen/getpwent.c seems to be the place to make the change...
> (I code the propose "patch" very quickly, it should defintly be reviewed).
>
> before:
> p = (geteuid()) ? _PATH_MP_DB : _PATH_SMP_DB;
> _pw_db = dbopen(p, O_RDONLY, 0, DB_HASH, NULL);
> if (_pw_db) {
> [code]
>
> after:
> if((DB *)0 == (_pw_db=dbopen(_PATH_SMP_DB, O_RDONLY, 0, DB_HASH, NULL))) {
> _pw_db = dbopen(_PATH_MP_DB, O_RDONLY, 0, DB_HASH, NULL);
> }
> if ((DB *)0 ==_pw_db) {
> [code]
>
Looks good!
As I said, I hope I will have time to make experiments this weekend.
We may not forget the code that touches /etc/master.passwd and
/etc/spwd.db for writing. I think this will be mainly pwd_mkdb and maybe
others. We have to be careful here...
-Andre
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-security" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19981118104819.A1664>
