Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Date: Fri, 4 May 2001 21:02:04 +0200
From: Corinna Vinschen <cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: (Fwd) CYGWIN=nontsec nontea ???
Message-ID: <20010504210204.I24200@cygbert.vinschen.de>
Mail-Followup-To: cygwin@cygwin.com
References: <3AF3048F.13957.1EEBA8D@localhost>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <3AF3048F.13957.1EEBA8D@localhost>; from gerrit.haase@t-online.de on Fri, May 04, 2001 at 07:35:43PM +0200

On Fri, May 04, 2001 at 07:35:43PM +0200, Gerrit P. Haase wrote:
> 
> That is dubios...
> will it work if i set ntsec and ntea?
> 
> root@ISMENE ~
> $ id
> uid=500(root) gid=544(root) groups=544(root)
> 
> root@ISMENE ~
> $ /usr/sbin/fetchnews -vvv
> /usr/sbin/fetchnews: must be run as news or root
> 
> 
> >From the source:
> 
>     setgid( pw->pw_gid );
>     setuid( pw->pw_uid );
>     if ( getuid() = pw->pw_uid || getgid() = pw->pw_gid ) {
                   ^^^                      ^^^
		   These both shouldn't work here.

>         fprintf( stderr, "%s: must be run as news or root\n", progname );
>         return FALSE;
>     }
> 
> Is getuid or getgid not working on cygwin?

Nope, it's setuid which can't change the user context without
a password. Result: The uid isn't changed...

Did you read the ntsec chapter in the users guide?

Corinna

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

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

