delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/07/11/15:56:37

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: Fri, 11 Jul 2003 21:56:26 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: cygwin_logon_user() not working
Message-ID: <20030711195626.GD12368@cygbert.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <3F0EEC29 DOT 447921AB AT cybertheque DOT org>
Mime-Version: 1.0
In-Reply-To: <3F0EEC29.447921AB@cybertheque.org>
User-Agent: Mutt/1.4.1i

On Fri, Jul 11, 2003 at 11:56:09AM -0500, msg wrote:
> be owned by the new uid.  The code fails on the call to
> cygwin_logon_user() which returns -1 (invalid HANDLE). The output
> of 'strace' on this program shows cygwin_logon_user() extracting
> the /etc/passwd information followed by a 'windows error 1314' which
> is 'unknown' and converted to error 13.

But you did look what error 1314 means, right?

> We've tried running the program from a bash shell logged-in as
> user 'root' and again logged-in as user 'Administrator' with no
> difference (Windows logins, not cygwin 'login' logins).

So it runs as expected.  Admin accounts don't have the right to call
LogonUser up to W2K.  This would only work on XP and 2003.  You have
to add the SeTcpPrivilege to the user who should call LogonUser.  See
http://cygwin.com/cygwin-ug-net/ntsec.html#NTSEC-SETUID for the needed
user privileges (up to W2K).

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