This is the mail archive of the cygwin-developers@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: 1.5.12


On Fri, Oct 08, 2004 at 06:12:53PM +0200, Corinna Vinschen wrote:
> 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.

Agreed.  Actually, I was a little sloppy with the above problem
characterization.  I will try again:

    If a user tries to connect to proftpd when not logged at all,
    then the proftpd login fails because chdir() to the user's home
    directory fails.  If they are already logged in, then the proftpd
    login succeeds.

For example, if the user is already logged in via ssh, then logging in
via proftpd works.

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

I just tried the above.  Unfortunately, the Cygwin DLL I built seems to
be having networking problems -- at least sshd and proftpd hang during
connection attempts.

Anyway, I found a workaround that may give some hints to the root cause.
If I give Everyone read access to all keys along the following registry
path:

    HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2

then the proftpd login succeeds.

This problem seems to be similar to one of the issues I found with exim:

    If the user "exim" is defined, it (or its group, or Everyone) needs
    to have execute access to exim and the dlls it uses, as well as read
    access to the registry keys (check with regedt32)
     1. HKLM\System\CurrentControlSet\Services\Winsock\Parameters
     2. HKLM\System\CurrentControlSet\Services\WinSock2\Parameters
     Lack of access causes the respective error messages
     1. IPv4 socket creation failed: Operation not permitted
     2. cannot find smtp/tcp service when starting daemon

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6


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