delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1999/09/11/15:37:32

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-developers-unsubscribe-archive-cygwin-developers=delorie DOT com AT sourceware DOT cygnus DOT com>
List-Subscribe: <mailto:cygwin-developers-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-developers-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com
Message-ID: <37DAB071.D5B0FE6B@vinschen.de>
Date: Sat, 11 Sep 1999 21:41:37 +0200
From: Corinna Vinschen <corinna AT vinschen DOT de>
X-Mailer: Mozilla 4.6 [en] (WinNT; I)
X-Accept-Language: de,en
MIME-Version: 1.0
To: Kazuhiro Fujieda <fujieda AT jaist DOT ac DOT jp>
CC: cygwin-developers <cygwin-developers AT sourceware DOT cygnus DOT com>
Subject: Re: /etc/passwd emulation
References: <1503 DOT 990910 AT logos-m DOT ru> <s1s7llzrsqq DOT fsf AT jaist DOT ac DOT jp> <s1s4sh1s49f DOT fsf AT jaist DOT ac DOT jp>

Kazuhiro Fujieda wrote:
> 
> > Now, I came to realize it is not so bad idea that the uid become
> > always DEFAULT_UID when there is no /etc/passwd. I couldn't,
> > however, understand why the emulation code make the user name
> > `Administrator' when GetUserNameA() fails.
> 
> So, I believe the following patch is meaningful.
> 
> Sat Sep 11 02:21:53 1999  Kazuhiro Fujieda (fujieda AT jaist DOT ac DOT jp)
> 
>         * passwd.cc (read_etc_passwd): /etc/passwd emulation use
>         the user name `unknown' for an unknown user.
> 
> [...]

Sorry, but I can't see the sense of this patch.

The call to getlogin() is the same as a call to GetUserName()
but if it fails, it returns 'unknown'. The original source of
read_etc_passwd() sets 'Administrator' as fallback and this is
the only difference. While the username is senseless on 9X
systems, on NT 'Administrator' would be a better fallback than
'unknown'.So, why should it be changed then...

Corinna

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019