delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2000/09/29/16:59:11

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-developers-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com
Message-ID: <39D50295.FA3AE73D@cygnus.com>
Date: Fri, 29 Sep 2000 22:59:01 +0200
From: Corinna Vinschen <vinschen AT cygnus DOT com>
Reply-To: cygdev <cygwin-developers AT sources DOT redhat DOT com>
X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.14-SMP i686)
X-Accept-Language: de, en
MIME-Version: 1.0
To: cygwin developers <cygwin-developers AT sourceware DOT cygnus DOT com>
Subject: Re: seteuid ?
References: <20000929203651 DOT 1115 DOT qmail AT web106 DOT yahoomail DOT com>

Earnie Boyd wrote:
> 
> Hey Corinna,
> 
> I've copied my Domain User /etc/passwd record and changed the User=root and
> UID=0.  If I put this record first in /etc/passwd file I could `su -' just fine
> and dandy.  However, that ended up as the user record when starting bash.
> Moving the record to the end of the file, I `su -' and I would the EPERM error.
> This is due to the test of pw_cur != pw_new.  I removed the set_errno and
> return -1 statements and su now changes the effective user.  Comments?

What you have done is _not_ changing the user context. It only looks as
if the context has changed. The test in seteuid() is intended to check
if a previous cygwin_logon_user()/cygwin_set_impersonation_token() pair
was called prior to using seteuid(). I have described that in detail in
the documentation. You can't change the user context without providing
a password. I have finally managed to update the net documentation to
contain the "New setuid concept" chapter. Take a look.

Hope, that helps,
Corinna

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

- Raw text -


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