This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Multiple users in fetchmail


On Mon, Aug 19, 2002 at 04:54:43PM -0400, Jason Tishler wrote:
> Corinna,
> 
> > On Mon, Aug 12, 2002 at 11:19:49AM -0400, Jason Tishler wrote:
> > > 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.
> 
> Did you really mean the following?
> 
>     uid_t orig_uid = geteuid (); // geteuid() not getuid()
>     seteuid (ctl->uid);          // seteuid() not setuid()
> 
>     [...]
> 
>     seteuid (orig_uid);
> 
> Note that fetchmail is using seteuid() not setuid().

Sure.

Corinna

-- 
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
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]