Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Tue, 22 Apr 2003 00:23:53 +0200
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: proftpd (was: Re: inetutils ftpd fcntl(F_SETOWN) failure message suppression patch)
Message-ID: <20030421222353.GF11137@cygbert.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <20030103133222.GA1712@tishler.net> <20030107150428.A14974@cygbert.vinschen.de> <20030109164436.GA1064@tishler.net> <20030109164943.GA3100@redhat.com> <20030109182038.G21839@cygbert.vinschen.de> <20030113143459.GE1012@tishler.net> <176380637637.20030421225541@familiehaase.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <176380637637.20030421225541@familiehaase.de>
User-Agent: Mutt/1.4.1i

On Mon, Apr 21, 2003 at 10:55:41PM +0200, Gerrit P. Haase wrote:
> Yes, I'm interested.
> It seems that there is a problem with the login.
> I could compile the current cvs source, the server runs, but ...
> I cannot login.
> [...]
> +#ifdef __CYGWIN__
> +  /* We have to do special Windows NT voodoo with Cygwin in order to be
> +   * able to switch UID/GID. More info at
> +   * http://cygwin.com/cygwin-ug-net/ntsec.html#NTSEC-SETUID
> +   */
> +       if (is_winnt) {
> +               HANDLE hToken = cygwin_logon_user(pw, pass);
> +
> +               if (hToken == INVALID_HANDLE_VALUE)
> +          goto auth_failure;
> +               cygwin_set_impersonation_token(hToken);
> +       }
> +#endif /* __CYGWIN__ */
> +

Actually I'm missing something like an `else' here.  The authentication
on NT/2K/XP is done *instead* of making any authentication like calling
crypt() to verify the password or calling some PAM functions.  You must
make sure that on NT/2K/XP that stuff doesn't get called.  On 9x/Me
OTOH you still must use crypt() to verify the password.  If you want to
see a really simple example, have a look into the login(1) source


-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.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/

