delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/05/05/01:08:42

From: hawkeye AT CommerceWave DOT com (Ken Keys)
Subject: Re: getpwuid
5 May 1997 01:08:42 -0700 :
Sender: mail AT cygnus DOT com
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <199705050657.XAA04213.cygnus.gnu-win32@dilbert.commercewave.com>
Original-To: noer AT cygnus DOT com (Geoffrey Noer)
Original-Cc: bje AT air DOT net DOT au, gnu-win32 AT cygnus DOT com
In-Reply-To: <199705032028.NAA22625@rtl.cygnus.com> from "Geoffrey Noer" at May 3, 97 01:28:27 pm
X-Mailer: ELM [version 2.4 PL24]
MIME-Version: 1.0
Original-Sender: owner-gnu-win32 AT cygnus DOT com

Geoffrey Noer wrote:
> In beta 18 we add:
> 
> Under NT only, chown(), getgrgid(), getgrnam(), endgrent(), getgrent(),
> setpwend(), getpwent(), endpwent().  Win95 still has these as stubs.
> 
> You will need to make an /etc/passwd and /etc/group for some
> calls to work.  That said, we provide a mkpasswd and mkgroup that
> create valid /etc files from the NT user database.

Wouldn't it make more sense to have those functions operate directly on
the NT user DB, instead of on "unixified" copies of them?  The cygwin
copy will get out of sync and need to be rebuilt whenever the native
copy is changed.  The pw API was explicitly designed to *avoid*
dependance on a particluar storage format; cygwin should take advantage
of that and not require users to maintain artificial copies.

One could argue that having a unix-style /etc/passwd would allow the
working of programs that read /etc/passwd directly instead of going
through the pw API.  But, 1) such programs are already nonportable,
since not even all unix-like systems use the same format for /etc/passwd,
and 2) IMO, supporting badly written software isn't worth the trouble
it will cause for users when their user DB's get out of sync.

(BTW, I don't use NT myself, just thought I'd point out [what I consider to
be] a mistake before it happened).

-- 
Ken Keys (hawkeye AT CommerceWave DOT com)
Software Engineering Team Leader
CommerceWave, Inc.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019