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: Mon, 12 Aug 2002 11:19:49 -0400
From: Jason Tishler <jason@tishler.net>
Subject: Re: Multiple users in fetchmail
In-reply-to: <20020812153640.R17250@cygbert.vinschen.de>
To: cygwin@cygwin.com
Mail-followup-to: cygwin@cygwin.com
Message-id: <20020812151949.GA2168@tishler.net>
MIME-version: 1.0
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-disposition: inline
User-Agent: Mutt/1.4i
References: <20020811140204.3f1780c9.jim.george@blueyonder.co.uk>
 <20020812103113.H17250@cygbert.vinschen.de>
 <20020812132847.GB1928@tishler.net> <20020812153640.R17250@cygbert.vinschen.de>

On Mon, Aug 12, 2002 at 03:36:40PM +0200, Corinna Vinschen wrote:
> On Mon, Aug 12, 2002 at 09:28:48AM -0400, Jason Tishler wrote:
> > Grep-ing the fetchmail code, I get the following:
> > 
> >     $ grep 'set.*uid' *.c
> >     sink.c:    seteuid(ctl->uid);
> >     sink.c:    seteuid(0);
> > 
> > So, I presume that I will have to change the second hit above to:
> > 
> >     seteuid(18);
> 
> Better:
> 
>       uid_t orig_uid = getuid ();
>       setuid (ctl->uid);
> 
>       [...]
> 
>       seteuid (orig_uid);

Thanks for the above suggestion -- it will be part of the final
solution.

Unfortunately, I also have to teach fetchmail that a UID of 18 is
equivalent to 0 (i.e., root) under Cygwin.  Without this "ctl->uid"
above is always 18 and *not* the user's real UID.  It will take me some
time to track this down...  And I hope that the fetchmail maintainer
will accept such a patch...

Jason

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

