1.5.12

Corinna Vinschen vinschen@redhat.com
Fri Oct 8 16:11:00 GMT 2004


On Oct  8 10:51, Jason Tishler wrote:
>     If a user tries to connect to proftpd when not logged in to Windows,
>     then the proftpd login fails because chdir() to the user's home
>     directory fails.  If they are already logged in to Windows, then the
>     proftpd login succeeds.
> 
> I believe the problem is due to a bunch of seteuid() and setegid() calls
> by proftpd to drop root privileges which prevents Cygwin from being able
> to read its mount table in the registry.

This can't be a general problem, otherwise sshd wouldn't work.  OTOH, the
below might also happen to some of the people who report that sshd doesn't
work for them.

> So far, I have the following strace from a failure:
> 
>   218 8207898 [main] 27.0 3212 seteuid32: uid: 1027 myself->gid: 513
>   191 8208089 [main] 27.0 3212 seteuid32: Found token -1
>  1623 8209712 [main] 27.0 3212 set_process_privilege: 0 = set_process_privilege (SeCreateTokenPrivilege, 1)
>  4311 8214023 [main] 27.0 3212 set_process_privilege: 1 = set_process_privilege (SeCreateTokenPrivilege, 0)
>   402 8214425 [main] 27.0 3212 create_token: 1548 = create_token ()
>   989 8215414 [main] 27.0 3212 seterrno_from_win_error: /netrel/src/cygwin-snapshot-20041007-1/winsup/cygwin/sec_helper.cc:346 windows error 1008
>   112 8215526 [main] 27.0 3212 geterrno_from_win_error: windows error 1008 == errno 22

There's no token?  That's weird.  I never saw that before.  In that
situation it's trying to access the thread token AFAICS.  Would be
interesting to see what happens when it tries to open the process
token.

>   149 8216292 [main] 27.0 3212 reg_key::build_reg: failed to create key SOFTWARE in the registry

That's also weird.  There was no error message from load_registry_hive so
it should have been loaded successfully.  Unfortunately there's no Win32
error code.  You could change line 81 in registry.cc to

  debug_printf ("failed to create key %s in the registry, %d", name, res);

and try again to see what error code is returned.


Corinna

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



More information about the Cygwin-developers mailing list