Subject: Re: pseudo-shadowing of passwords [...]
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Greg A. Woods <woods@most.weird.com>
List: tech-security
Date: 10/07/1998 11:08:44
[ On Wed, October 7, 1998 at 08:21:08 (-0400), der Mouse wrote: ]
> Subject: pseudo-shadowing of passwords [...]
>
> Any comments from anyone?  I'm imagining getpwent() and friends
> handling all this transparently, so that if /etc/master.passwd or
> /etc/passwd (whichever is being read) says "use homedir", they check
> geteuid(), and if it's zero or it matches the uid of the entry, go and
> attempt to read out of that file.
> 
> Good idea?  Bad idea?  Problems I don't seem to have thought of?

I'd stat() it first (or open() and then fstat(), whichever works best
for NFS attribute caching, etc.) and make sure it`s got no permissions
set outside of the S_IRWXU mask.  No sense giving users too much rope.

There are likely some potential problems with locking too, esp. on NFS,
since at least passwd(1) will need to be able to modify this file
without allowing any race conditions.

-- 
							Greg A. Woods

+1 416 218-0098      VE3TCP      <gwoods@acm.org>      <robohack!woods>
Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>