This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: getpwuid


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@CommerceWave.com)
Software Engineering Team Leader
CommerceWave, Inc.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]