delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/10/23/04:06:50

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
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Thu, 23 Oct 2003 10:06:28 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: SSH into XP: mapped network drives disappeared!
Message-ID: <20031023080628.GT1653@cygbert.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20031022183112 DOT GA18629 AT te35 DOT hq DOT eso DOT org> <bn6q4u$mse$1 AT sea DOT gmane DOT org> <20031022205204 DOT GS1653 AT cygbert DOT vinschen DOT de> <bn72pv$su9$1 AT sea DOT gmane DOT org>
Mime-Version: 1.0
In-Reply-To: <bn72pv$su9$1@sea.gmane.org>
User-Agent: Mutt/1.4.1i

On Wed, Oct 22, 2003 at 04:10:56PM -0700, Andrew DeFaria wrote:
> Corinna Vinschen wrote:
> >Cygwin doesn't pay attantion but tools do.  sshd, login, ftpd and any 
> >other tool which requires the home directory for doing it's job, most 
> >server applications and also several client tools as, say, ssh.
> >
> I thought that that might be the case. Why then not make Cygwin pay 
> attention to the home field in /etc/passwd? Why not change /etc/profile 
> to use it? (Perhaps I'm treading over an issue that was already discussed).

You're mixing stuff which doesn't belong to each other.  Cygwin is not
at all interested in $HOME or your /etc/passwd home entry.  The evaluation
of this values is done by tools in a UNIXy way.  Shells (bash, tcsh,
whatever) are traditionally only paying attention to $HOME.  Remember how
a logon to a UNIX machine works.  First, there's a terminal on which runs
a getty, then login(1) is called for the authentication,  login's only
available information is /etc/passwd.  After authentication, login sets
$HOME to the correct value and starts a shell.  The shell relies on the
fact, that $HOME has been set correctly by the logon procedure.

So, there are authenticating/logon tools which use /etc/passwd and
there are user tools, which rely on $HOME already been set correctly
by the former.  That's just the way it works.

Especially /etc/profile should *not* take the /etc/passwd value for
evaluating the home directory.  /etc/profile is used by the shell, in
a state when $HOME should already have a value.  If /etc/profile sets
$HOME, this would overwrite custom settings from login tools.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin AT cygwin DOT com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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