delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/01/31/04:54:06

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <3C59141E.9080504@syntrex.com>
Date: Thu, 31 Jan 2002 10:53:34 +0100
From: Pavel Tsekov <ptsekov AT syntrex DOT com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20011126 Netscape6/6.2.1
X-Accept-Language: en-us
MIME-Version: 1.0
To: Robert Collins <robert DOT collins AT itdomain DOT com DOT au>
CC: cygwin AT cygwin DOT com
Subject: Re: Fw: After new install, start in /usr/bin/{myname} not in /home/{myname}
References: <062201c1a77a$d9afa460$0200a8c0 AT lifelesswks>

Hello, Robert :)

I've just tracked this problem. Here is what I've found:

First of all the problem will appear on Win9x/ME only.
In version 1.18 of mkpasswd.c the following change was
made:

-
-  if (passed_home_path[0] == '\0')
-      strcpy (passed_home_path, "/home/");

    /* This takes Windows 9x/ME into account. */
    if (GetVersion () >= 0x80000000)

passed_home_path is initially an empty string and then
if the option -p is passed to mkpasswd, passed_home_path
is assigned the value of this option. Now here is
how setup.exe invokes mkpasswd:

   if (!uexists ("/etc/passwd"))
     fprintf (p, "bin\\mkpasswd -l > etc\\passwd\n");


There is no sync between the setup.exe behaviour and
the new mkpasswd behaviour.


Robert Collins wrote:

> There is apparently a bug in mkpasswd. (I was tracking to see if
> setup.exe was the culprit).
> 
> On this machine (and others have been reported too) mkpasswd returns a
> bad home path, which leads to somewhat strange behaviour.
> 
> The two attached cygchecks, from Fergus, show the environment with a bad
> /etc/passwd (.chk) and with a good one (.out).
> 
> Hopefully this gives a clue as to why mkpasswd misbehaves, I haven't had
> time to look at source yet.
> 
> Rob
> 
> ===
> ----- Original Message -----
> From: "fergus at bonhard dot uklinux dot net"
> <fergus AT bonhard DOT uklinux DOT net>
> To: "Robert Collins" <robert DOT collins AT itdomain DOT com DOT au>
> Cc: <fergus AT bonhard DOT uklinux DOT net>
> Sent: Monday, January 28, 2002 12:40 AM
> Subject: Re: After new install, start in /usr/bin/{myname} not in
> /home/{myname}
> 
> 
> 
>>>As for the incorrect /etc/passwd creation (which is IMO the actual
>>>
> fault
> 
>>>you are seeing) can you send me the output of "mkpasswd -l"?
>>>
>>Hey: interesting. Look at this:
>>
>>~> mkpasswd -l
>>            Fergus::500:544::Fergus:/bin/bash
>>~> cat /etc/passwd
>>            Fergus::500:544::/home/Fergus:/bin/bash
>>
>>(This is _after_ I've edited the file /etc/passwd. In "failed setup"
>>
> mode
> 
>>the file /etc/passwd contains exactly the output from mkpasswd -l
>>
> above.)
> 
>>OK. Now I'll see whether I can be more ghelpful in describing what the
>>prototype new setup.exe gives me.



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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