[3153] in linux-net channel archive

home help back first fref pref prev next nref lref last post

Re: gated 3.6A1 for 1.3.99 (diffs)

daemon@ATHENA.MIT.EDU (Marek Michalkiewicz)
Sun Jun 9 16:39:15 1996

From: Marek Michalkiewicz <marekm@i17linuxb.ists.pwr.wroc.pl>
To: gafton@sorosis.ro (Cristian Gafton)
Date: 	Sun, 9 Jun 1996 15:18:53 +0200 (MET DST)
Cc: scldad@sdc.com.au, linux-net@vger.rutgers.edu
In-Reply-To: <Pine.LNX.3.91.960609150446.6124B-100000@main.sorosis.ro> from "Cristian Gafton" at Jun 9, 96 03:10:37 pm

Cristian Gafton:
> Still, I seriously doubt that this will work on shadow-aware systems 
> without actually having /etc/shadow.

Why not?  Many other programs do it this way and work just fine -
if /etc/shadow doesn't exist, getspnam() will return NULL and the
password from /etc/passwd will be used.  If you see any specific
problems with this, let me know.

> Why not check the presence of /etc/shadow and if it is present and size > 
> 0 then proceed with shadow things ?

Because it's more code which is not necessary in most cases.  I do it
only in programs which need to modify password files (passwd already
works with both shadow and non-shadow passwords in my current, not yet
unreleased source).

Besides, the implementation of getspnam() might change later, so there
shouldn't be too many programs with hardcoded check for /etc/shadow.
(Not that it is expected to change anytime soon, but...)

Regards,

Marek


home help back first fref pref prev next nref lref last post