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: sshd/cron seteuid() problem in latest CVS


Corinna,

On Mon, Apr 15, 2002 at 01:18:09PM +0200, Corinna Vinschen wrote:
> On Fri, Apr 12, 2002 at 11:21:32AM -0400, Jason Tishler wrote:
> > Using the latest CVS, I am getting the following Event Log error messages:
> > 
> >     o fatal: setuid 19695: Operation not permitted
> >     o (CRON) error (can't switch user context)
> > 
> > with sshd and cron, respectively.  After some debugging, I determined
> > that the following patch is causing the problem:
> > 
> >     http://cygwin.com/ml/cygwin-cvs/2002-q1/msg00218.html
> > 
> > The above patch needs to be reverted or reworked.  See attached for an
> > strace snippet.
> > 
> > Note that I'm operating in a domain environment.  My WAG is that this
> > problem may not be apparent in a workgroup environment.
> 
> This isn't clear to me.  The patch only changes the way, the PDC
> is elicited.

After some more digging, I believe that I have found the root cause to
the above problem.  The new way, via NetGetDCName(), causes two extra
backslashes to be prepended to the PDC name as demonstrated by the
attached test program:

    NetServerEnum PDC = PALO-ALTO-PDC
    NetGetDCName PDC = \\PALO-ALTO-PDC

This causes the NetUserGetGroups() call in get_user_groups() to SEGV
(at least under gdb) and hence, ultimately create_token() fails.

My WAG regarding domain vs. workgroup was correct because the workgroup
path through this code does not cause extra backslashes to be prepended.

I will submit a patch to cygwin-patches to correct this problem.

Thanks,
Jason

Attachment: net.cc
Description: Text document

--
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]