This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: getpwuid
- To: Gunther Ebert <gunther dot ebert at ixos-leipzig dot de>
- Subject: Re: getpwuid
- From: Michaela Kurz <micha at genias dot de>
- Date: Tue, 6 May 1997 09:57:42 +0200 (MET DST)
- cc: 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@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".