Subject: Re: getpwuid
From: [email-masked] (Ken Keys)

5 May 1997 01:08:42 -0700
Sender: [email-masked]
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Original-To: [email-masked] (Geoffrey Noer)
Original-Cc: [email-masked], [email-masked]
In-Reply-To: <[email-masked]> from "Geoffrey Noer" at May 3, 97 01:28:27 pm
X-Mailer: ELM [version 2.4 PL24]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Original-Sender: [email-masked]

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 ([email-masked])
Software Engineering Team Leader
CommerceWave, Inc.
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".