getpwuid

Michaela Kurz micha@genias.de
Tue May 6 00:56:00 GMT 1997


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
  micha@genias.de            /  Fax:      /9200-92
 


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".



More information about the Cygwin mailing list