delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/05/06/02:47:26

From: micha AT genias DOT de (Michaela Kurz)
Subject: Re: getpwuid
6 May 1997 02:47:26 -0700 :
Sender: mail AT cygnus DOT com
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <Pine.SUN.3.91.970506094423.6372A-100000.cygnus.gnu-win32@BALIN.genias.de>
Original-To: Gunther Ebert <gunther DOT ebert AT ixos-leipzig DOT de>
Original-cc: gnu-win32 AT cygnus DOT com
In-Reply-To: <336DCCA7.54A8@ixos-leipzig.de>
MIME-Version: 1.0
Original-Sender: owner-gnu-win32 AT cygnus DOT com

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 AT genias DOT de            /  Fax:      /9200-92
 


-
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