Subject: Re: getpwuid
From: [email-masked] (Michaela Kurz)

6 May 1997 02:47:26 -0700
Sender: [email-masked]
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Original-To: Gunther Ebert <[email-masked]>
Original-cc: [email-masked]
In-Reply-To: <[email-masked]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Original-Sender: [email-masked]

On Mon, 5 May 1997, Gunther Ebert wrote:

> Ken Keys wrote:
> 
>   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.
> 

I don't think an /etc/passwd for NT is an option if you really
want to port the software.

I have chosen the following workaround:

NT has a lot of environment variables. I use HOMEDRIVE and HOMEPATH
to assemble the user's home directory and USERNAME to retrieve the
user's name. 

It has worked so far, if I see some day that this is only a limited
solution then I'll have to add registry calls. 

Michaela Kurz

-------------------------------------------------------
M. Kurz
  Genias Software GmbH       /  Tel: 09401/9200-0
  [email-masked]            /  Fax:      /9200-92

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".