public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* inetutils ftpd fcntl(F_SETOWN) failure message suppression patch
@ 2003-01-13  2:54 Jason Tishler
  2003-01-13  3:04 ` Corinna Vinschen
  0 siblings, 1 reply; 22+ messages in thread
From: Jason Tishler @ 2003-01-13  2:54 UTC (permalink / raw)
  To: Cygwin

[-- Attachment #1: Type: text/plain, Size: 560 bytes --]

Corrina,

The attached patch to ftpd prevents messages like the following from
filling up the Event Log whenever someone connects to the server:

    [34724] ftpd
       Type:     ERROR 
       Computer: TISHLERJASON
       Time:     12/31/2002 3:10:21 PM   ID:       0 
       User:     SYSTEM\NT AUTHORITY
    ftpd : Win32 Process Id = 0xDC8 : Cygwin Process Id = 0xE54 : fcntl F_SETOWN: In valid argument

Thanks,
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

[-- Attachment #2: ftpd.c.diff --]
[-- Type: text/plain, Size: 358 bytes --]

--- ftpd.c.orig	2002-10-01 15:39:24.000000000 -0400
+++ ftpd.c	2003-01-03 08:02:11.000000000 -0500
@@ -382,7 +382,7 @@ main(argc, argv, envp)
 		syslog(LOG_ERR, "setsockopt: %m");
 #endif
 
-#ifdef	F_SETOWN
+#if defined(F_SETOWN) && !defined(__CYGWIN__)
 	if (fcntl(fileno(stdin), F_SETOWN, getpid()) == -1)
 		syslog(LOG_ERR, "fcntl F_SETOWN: %m");
 #endif

[-- Attachment #3: ftpd.c.ChangeLog --]
[-- Type: text/plain, Size: 215 bytes --]

2003-01-03  Jason Tishler  <jason@tishler.net>

	* ftpd/ftpd.c (main): Add Cygwin guard to the conditional compilation
	around fcntl(F_SETOWN) to prevent the Event Log from filling with
	expected failure messages.


[-- Attachment #4: Type: text/plain, Size: 214 bytes --]

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

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: inetutils ftpd fcntl(F_SETOWN) failure message suppression patch
  2003-01-13  2:54 inetutils ftpd fcntl(F_SETOWN) failure message suppression patch Jason Tishler
@ 2003-01-13  3:04 ` Corinna Vinschen
  2003-01-13  3:30   ` Jason Tishler
  0 siblings, 1 reply; 22+ messages in thread
From: Corinna Vinschen @ 2003-01-13  3:04 UTC (permalink / raw)
  To: Cygwin

On Fri, Jan 03, 2003 at 08:32:22AM -0500, Jason Tishler wrote:
> Corrina,

s/rrin/rinn/

> 2003-01-03  Jason Tishler  <jason@tishler.net>
> 
> 	* ftpd/ftpd.c (main): Add Cygwin guard to the conditional compilation
> 	around fcntl(F_SETOWN) to prevent the Event Log from filling with
> 	expected failure messages.

Thanks, I've just uploaded a new version containig this patch.

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/

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: inetutils ftpd fcntl(F_SETOWN) failure message suppression patch
  2003-01-13  3:04 ` Corinna Vinschen
@ 2003-01-13  3:30   ` Jason Tishler
  2003-01-13  3:30     ` Christopher Faylor
  0 siblings, 1 reply; 22+ messages in thread
From: Jason Tishler @ 2003-01-13  3:30 UTC (permalink / raw)
  To: cygwin

Corinna,

On Tue, Jan 07, 2003 at 03:04:28PM +0100, Corinna Vinschen wrote:
> On Fri, Jan 03, 2003 at 08:32:22AM -0500, Jason Tishler wrote:
> > Corrina,
> 
> s/rrin/rinn/

Argh!  Sorry, again.

> > 2003-01-03  Jason Tishler  <jason@tishler.net>
> > 
> > 	* ftpd/ftpd.c (main): Add Cygwin guard to the conditional
> > 	compilation around fcntl(F_SETOWN) to prevent the Event Log from
> > 	filling with expected failure messages.
> 
> Thanks, I've just uploaded a new version containig this patch.

You are quite welcome.

Would you be willing to to consider the following:

    http://www.cygwin.com/ml/cygwin/2002-10/msg00116.html

Or, is it too esoteric for you?

Thanks,
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

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: inetutils ftpd fcntl(F_SETOWN) failure message suppression patch
  2003-01-13  3:30   ` Jason Tishler
@ 2003-01-13  3:30     ` Christopher Faylor
  2003-01-13  3:30       ` Corinna Vinschen
  0 siblings, 1 reply; 22+ messages in thread
From: Christopher Faylor @ 2003-01-13  3:30 UTC (permalink / raw)
  To: cygwin

On Thu, Jan 09, 2003 at 11:44:36AM -0500, Jason Tishler wrote:
>Corinna,
>
>On Tue, Jan 07, 2003 at 03:04:28PM +0100, Corinna Vinschen wrote:
>> On Fri, Jan 03, 2003 at 08:32:22AM -0500, Jason Tishler wrote:
>> > Corrina,
>> 
>> s/rrin/rinn/
>
>Argh!  Sorry, again.
>
>> > 2003-01-03  Jason Tishler  <jason@tishler.net>
>> > 
>> > 	* ftpd/ftpd.c (main): Add Cygwin guard to the conditional
>> > 	compilation around fcntl(F_SETOWN) to prevent the Event Log from
>> > 	filling with expected failure messages.
>> 
>> Thanks, I've just uploaded a new version containig this patch.
>
>You are quite welcome.
>
>Would you be willing to to consider the following:
>
>    http://www.cygwin.com/ml/cygwin/2002-10/msg00116.html
>
>Or, is it too esoteric for you?

Judging by the description, that sounds more like a patch for the FSF
inetutils maintainer than for the Cygwin inetutils maintainer.

cgf

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: inetutils ftpd fcntl(F_SETOWN) failure message suppression patch
  2003-01-13  3:30     ` Christopher Faylor
@ 2003-01-13  3:30       ` Corinna Vinschen
  2003-01-13 15:33         ` Jason Tishler
  0 siblings, 1 reply; 22+ messages in thread
From: Corinna Vinschen @ 2003-01-13  3:30 UTC (permalink / raw)
  To: cygwin

On Thu, Jan 09, 2003 at 11:49:43AM -0500, Chris Faylor wrote:
> On Thu, Jan 09, 2003 at 11:44:36AM -0500, Jason Tishler wrote:
> >Would you be willing to to consider the following:
> >
> >    http://www.cygwin.com/ml/cygwin/2002-10/msg00116.html
> >
> >Or, is it too esoteric for you?
> 
> Judging by the description, that sounds more like a patch for the FSF
> inetutils maintainer than for the Cygwin inetutils maintainer.

I agree.  I don't really want to add functionality besides what is
normal for this inetutils.  In the long run, we should consider to
get rid of this inetutils anyway and substitute them by a new version
started via cygrunsrv or sysvinit resp.

Oh btw... wouldn't you better like to maintain ProFTPd for Cygwin?  ;-)

Corinna

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

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: inetutils ftpd fcntl(F_SETOWN) failure message suppression patch
  2003-01-13  3:30       ` Corinna Vinschen
@ 2003-01-13 15:33         ` Jason Tishler
  2003-04-22  2:10           ` proftpd (was: Re: inetutils ftpd fcntl(F_SETOWN) failure message suppression patch) Gerrit P. Haase
  0 siblings, 1 reply; 22+ messages in thread
From: Jason Tishler @ 2003-01-13 15:33 UTC (permalink / raw)
  To: cygwin

Corinna,

[I began to reply to this post on Friday, but I got distracted by
attempting to port vsFTPd to Cygwin.  This turned out to be a good
use of my time.  BTW, I never knew about vsFTPd.  I wish I did about a
month ago...]

On Thu, Jan 09, 2003 at 06:20:38PM +0100, Corinna Vinschen wrote:
> On Thu, Jan 09, 2003 at 11:49:43AM -0500, Chris Faylor wrote:
> > On Thu, Jan 09, 2003 at 11:44:36AM -0500, Jason Tishler wrote:
> > >Would you be willing to to consider the following:
> > >
> > >    http://www.cygwin.com/ml/cygwin/2002-10/msg00116.html
> > >
> > >Or, is it too esoteric for you?
> > 
> > Judging by the description, that sounds more like a patch for the
> > FSF inetutils maintainer than for the Cygwin inetutils maintainer.
> 
> I agree.

I agree too, but it was worth a shot because...

> Oh btw... wouldn't you better like to maintain ProFTPd for Cygwin?
> ;-)

I would consider the above, if I could get Cygwin ProFTPd to work!  I
spent *way* too much time about a month or two ago attempting to get
Cygwin ProFTPd to work.  Unfortunately, I was not successful and put the
port on the back burner.  I will post my patch and findings if someone
is interested or I get motivated.

However, I was successful porting vsFTPd to Cygwin with some caveats.  I
will start a separate thread to discuss these issues.  Please read this
post since I could use some help with a mmap()/fork() problem...

Thanks,
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

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

^ permalink raw reply	[flat|nested] 22+ messages in thread

* proftpd (was: Re: inetutils ftpd fcntl(F_SETOWN) failure message suppression patch)
  2003-01-13 15:33         ` Jason Tishler
@ 2003-04-22  2:10           ` Gerrit P. Haase
  2003-04-22  4:50             ` Corinna Vinschen
  0 siblings, 1 reply; 22+ messages in thread
From: Gerrit P. Haase @ 2003-04-22  2:10 UTC (permalink / raw)
  To: cygwin

Hallo Jason,

>> Oh btw... wouldn't you better like to maintain ProFTPd for Cygwin?
>> ;-)

> I would consider the above, if I could get Cygwin ProFTPd to work!  I
> spent *way* too much time about a month or two ago attempting to get
> Cygwin ProFTPd to work.  Unfortunately, I was not successful and put the
> port on the back burner.  I will post my patch and findings if someone
> is interested or I get motivated.

Yes, I'm interested.
It seems that there is a problem with the login.
I could compile the current cvs source, the server runs, but ...
I cannot login.

$ ftp localhost
Connected to loreley.antigone.familiehaase.de.
220 ProFTPD 1.2.9rc1 Server (ProFTPD Default Installation) [loreley.antigone.familiehaase.de]
Name (localhost:Gerrit): gerrit
331 Password required for gerrit.
Password:
530 Login incorrect.
ftp: Login failed.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> quit
221 Goodbye.

I applied the following patch to the current source, but it seems
that it is still all wrong...

--- modules/mod_auth.c~ 2003-04-21 22:18:26.000000000 +0200
+++ modules/mod_auth.c  2003-04-21 22:22:18.000000000 +0200
@@ -29,14 +29,15 @@
  * $Id: mod_auth.c,v 1.145 2003/04/15 06:22:24 castaglia Exp $
  */
 
-#ifdef __CYGWIN__
-#include <windows.h>
-#include <sys/cygwin.h>
-#endif /* __CYGWIN__ */
-
 #include "conf.h"
 #include "privs.h"
 
+#ifdef __CYGWIN__
+# include <windows.h>
+# include <sys/cygwin.h>
+# define is_winnt       (GetVersion() < 0x80000000)
+#endif /* __CYGWIN__ */
+
 #ifdef HAVE_REGEX_H
 #include <regex.h>
 #endif
@@ -762,9 +762,22 @@
   /* security: other functions perform pw lookups, thus we need to make
    * a local copy of the user just looked up
    */
-
   pw = passwd_dup(p,pw);
 
+#ifdef __CYGWIN__
+  /* We have to do special Windows NT voodoo with Cygwin in order to be
+   * able to switch UID/GID. More info at
+   * http://cygwin.com/cygwin-ug-net/ntsec.html#NTSEC-SETUID
+   */
+       if (is_winnt) {
+               HANDLE hToken = cygwin_logon_user(pw, pass);
+
+               if (hToken == INVALID_HANDLE_VALUE)
+          goto auth_failure;
+               cygwin_set_impersonation_token(hToken);
+       }
+#endif /* __CYGWIN__ */
+
   if (pw->pw_uid == 0) {
     unsigned char *root_allow = NULL;
 
@@ -1774,21 +1788,6 @@
     }
   }
 
-#ifdef __CYGWIN__
-  /* We have to do special Windows NT voodoo with Cygwin in order to be
-   * able to switch UID/GID. More info at
-   * http://cygwin.com/cygwin-ug-net/ntsec.html#NTSEC-SETUID
-   */
-  if (GetVersion() < 0x80000000) {
-    HANDLE token;
-
-    if ((token = cygwin_logon_user(user, user->pw_passwd)))
-      goto auth_failure;
-
-    cygwin_set_impersonation_token(token);      
-  }
-#endif /* __CYGWIN__ */
-
   if (c)
     anon_require_passwd = get_param_ptr(c->subset, "AnonRequirePassword",
       FALSE);


#END OF PATCH


Gerrit
-- 
=^..^=


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: proftpd (was: Re: inetutils ftpd fcntl(F_SETOWN) failure message suppression patch)
  2003-04-22  2:10           ` proftpd (was: Re: inetutils ftpd fcntl(F_SETOWN) failure message suppression patch) Gerrit P. Haase
@ 2003-04-22  4:50             ` Corinna Vinschen
  2003-04-22  9:21               ` proftpd Gerrit P. Haase
  0 siblings, 1 reply; 22+ messages in thread
From: Corinna Vinschen @ 2003-04-22  4:50 UTC (permalink / raw)
  To: cygwin

On Mon, Apr 21, 2003 at 10:55:41PM +0200, Gerrit P. Haase wrote:
> Yes, I'm interested.
> It seems that there is a problem with the login.
> I could compile the current cvs source, the server runs, but ...
> I cannot login.
> [...]
> +#ifdef __CYGWIN__
> +  /* We have to do special Windows NT voodoo with Cygwin in order to be
> +   * able to switch UID/GID. More info at
> +   * http://cygwin.com/cygwin-ug-net/ntsec.html#NTSEC-SETUID
> +   */
> +       if (is_winnt) {
> +               HANDLE hToken = cygwin_logon_user(pw, pass);
> +
> +               if (hToken == INVALID_HANDLE_VALUE)
> +          goto auth_failure;
> +               cygwin_set_impersonation_token(hToken);
> +       }
> +#endif /* __CYGWIN__ */
> +

Actually I'm missing something like an `else' here.  The authentication
on NT/2K/XP is done *instead* of making any authentication like calling
crypt() to verify the password or calling some PAM functions.  You must
make sure that on NT/2K/XP that stuff doesn't get called.  On 9x/Me
OTOH you still must use crypt() to verify the password.  If you want to
see a really simple example, have a look into the login(1) source


-- 
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
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: proftpd
  2003-04-22  4:50             ` Corinna Vinschen
@ 2003-04-22  9:21               ` Gerrit P. Haase
  2003-04-22  9:41                 ` proftpd Gerrit P. Haase
                                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Gerrit P. Haase @ 2003-04-22  9:21 UTC (permalink / raw)
  To: Corinna Vinschen

Hallo Corinna,

Am Dienstag, 22. April 2003 um 00:23 schriebst du:
> On Mon, Apr 21, 2003 at 10:55:41PM +0200, Gerrit P. Haase wrote:
>> I could compile the current cvs source, the server runs, but ...
>> I cannot login.
>> [...]
>> +#ifdef __CYGWIN__
>> +  /* We have to do special Windows NT voodoo with Cygwin in order to be
>> +   * able to switch UID/GID. More info at
>> +   * http://cygwin.com/cygwin-ug-net/ntsec.html#NTSEC-SETUID
>> +   */
>> +       if (is_winnt) {
>> +               HANDLE hToken = cygwin_logon_user(pw, pass);
>> +
>> +               if (hToken == INVALID_HANDLE_VALUE)
>> +          goto auth_failure;
>> +               cygwin_set_impersonation_token(hToken);
>> +       }
>> +#endif /* __CYGWIN__ */
>> +

> Actually I'm missing something like an `else' here.  The authentication
> on NT/2K/XP is done *instead* of making any authentication like calling
> crypt() to verify the password or calling some PAM functions.  You must
> make sure that on NT/2K/XP that stuff doesn't get called.  On 9x/Me
> OTOH you still must use crypt() to verify the password.  If you want to
> see a really simple example, have a look into the login(1) source

I don't need it for Win98.  Windows 98 is a dead cow...

I configured with additional options and now I can login too.
But still having problems.  Lets see what Jason figured out.


Gerrit
-- 
=^..^=


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: proftpd
  2003-04-22  9:21               ` proftpd Gerrit P. Haase
@ 2003-04-22  9:41                 ` Gerrit P. Haase
  2003-04-22 14:40                   ` proftpd Corinna Vinschen
  2003-04-22 14:14                 ` proftpd Hannu E K Nevalainen (garbage mail)
  2003-04-22 14:58                 ` proftpd (and vsftpd too) Jason Tishler
  2 siblings, 1 reply; 22+ messages in thread
From: Gerrit P. Haase @ 2003-04-22  9:41 UTC (permalink / raw)
  To: Gerrit @ cygwin

Hallo Gerrit,

>>> I cannot login.
>>> [...]
>>> +#ifdef __CYGWIN__
>>> +  /* We have to do special Windows NT voodoo with Cygwin in order to be
>>> +   * able to switch UID/GID. More info at
>>> +   * http://cygwin.com/cygwin-ug-net/ntsec.html#NTSEC-SETUID
>>> +   */
>>> +       if (is_winnt) {

>> Actually I'm missing something like an `else' here.  The authentication

> I configured with additional options and now I can login too.
> But still having problems.  Lets see what Jason figured out.

I fooled myself, I entered my encrypted password into my passwd file at the
right place and so the unix way to login is done with success, but without the
password in my passwd file it still doesn't work.

Gerrit
-- 
=^..^=


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 22+ messages in thread

* RE: proftpd
  2003-04-22  9:21               ` proftpd Gerrit P. Haase
  2003-04-22  9:41                 ` proftpd Gerrit P. Haase
@ 2003-04-22 14:14                 ` Hannu E K Nevalainen (garbage mail)
  2003-04-23 12:26                   ` proftpd Gerrit P. Haase
  2003-04-22 14:58                 ` proftpd (and vsftpd too) Jason Tishler
  2 siblings, 1 reply; 22+ messages in thread
From: Hannu E K Nevalainen (garbage mail) @ 2003-04-22 14:14 UTC (permalink / raw)
  To: ML CygWIN

> From: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com]On Behalf
> Of Gerrit P. Haase

> I don't need it for Win98.  Windows 98 is a dead cow...

 That is true escapism. 8-I

 There still is some VERY useful software out there that *DOES NOT work* on
NT/2K.

 I've seen such software; the education I'm finishing have included the use
of such software on several occasions. As it seems now I will most likely
meet more of the same in my future work.

 One can wish... but real life situations doesn't change *that* fast.

/Hannu E K Nevalainen, Mariefred, Sweden
 - in a few weeks:  B.Sc. EE - micro and embedded computer systems

--END OF MESSAGE--


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: proftpd
  2003-04-22  9:41                 ` proftpd Gerrit P. Haase
@ 2003-04-22 14:40                   ` Corinna Vinschen
  0 siblings, 0 replies; 22+ messages in thread
From: Corinna Vinschen @ 2003-04-22 14:40 UTC (permalink / raw)
  To: Gerrit @ cygwin

On Tue, Apr 22, 2003 at 07:38:29AM +0200, Gerrit P. Haase wrote:
> Hallo Gerrit,
> 
> >>> I cannot login.
> >>> [...]
> >>> +#ifdef __CYGWIN__
> >>> +  /* We have to do special Windows NT voodoo with Cygwin in order to be
> >>> +   * able to switch UID/GID. More info at
> >>> +   * http://cygwin.com/cygwin-ug-net/ntsec.html#NTSEC-SETUID
> >>> +   */
> >>> +       if (is_winnt) {
> 
> >> Actually I'm missing something like an `else' here.  The authentication
> 
> > I configured with additional options and now I can login too.
> > But still having problems.  Lets see what Jason figured out.
> 
> I fooled myself, I entered my encrypted password into my passwd file at the
> right place and so the unix way to login is done with success, but without the
> password in my passwd file it still doesn't work.

As I said, there's probably a check (call to crypt() somewhere.  The
right way to do it is to leave it alone on 9x/Me (which therefore is
no problem to support here, btw.) and to call that NT stuff on NT systems.
That can't be too much of a problem...

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
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: proftpd (and vsftpd too)
  2003-04-22  9:21               ` proftpd Gerrit P. Haase
  2003-04-22  9:41                 ` proftpd Gerrit P. Haase
  2003-04-22 14:14                 ` proftpd Hannu E K Nevalainen (garbage mail)
@ 2003-04-22 14:58                 ` Jason Tishler
  2003-04-22 15:00                   ` Corinna Vinschen
  2003-04-23 15:47                   ` proftpd (and vsftpd too) Jason Tishler
  2 siblings, 2 replies; 22+ messages in thread
From: Jason Tishler @ 2003-04-22 14:58 UTC (permalink / raw)
  To: cygwin

Gerrit,

On Tue, Apr 22, 2003 at 07:18:11AM +0200, Gerrit P. Haase wrote:
> Lets see what Jason figured out.

The short answer is that I have given up on proftpd and I use vsftpd
instead.  Note that all that I needed was a firewall friendly ftp
server and vsftpd meets that requirement very nicely.

The long answer is the following...

I very quickly got passed the NT authentication part thanks to
leveraging off of Corinna's inetutils work.  Unfortunately, I had a
*lot* of trouble and spent *way* too much time trying to get proftpd
to function properly after switching users.

For some reason after proftpd switched users, operation like ls and
get/put would fail with strange errors (e.g., socket operation on a
non-socket).  Note that during the porting process, I temporarily had a
bug that prevented proftpd from switching users so it ran as
LocalSystem.  The perplexing thing was that proftpd ran perfectly under
the LocalSystem account except (of course) that transferred files had
the wrong ownership.

I can post my proftpd "patch" from my very stale CVS working directory.
Do you want it?

However, I really recommend my vsftpd patch instead.  The port is
complete except for the binary/text mode part.  Do you want this patch
instead?

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

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: proftpd (and vsftpd too)
  2003-04-22 14:58                 ` proftpd (and vsftpd too) Jason Tishler
@ 2003-04-22 15:00                   ` Corinna Vinschen
  2003-04-22 16:03                     ` Jason Tishler
  2003-04-23 15:47                   ` proftpd (and vsftpd too) Jason Tishler
  1 sibling, 1 reply; 22+ messages in thread
From: Corinna Vinschen @ 2003-04-22 15:00 UTC (permalink / raw)
  To: cygwin

On Tue, Apr 22, 2003 at 07:51:56AM -0400, Jason Tishler wrote:
> The short answer is that I have given up on proftpd and I use vsftpd
> instead.  Note that all that I needed was a firewall friendly ftp
> server and vsftpd meets that requirement very nicely.
> [...]
> However, I really recommend my vsftpd patch instead.  The port is
> complete except for the binary/text mode part.  Do you want this patch
> instead?

Jason, I hoped you would become maintainer for a vsftpd port as part
of the Cygwin distro at one point.  What's up?

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
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: proftpd (and vsftpd too)
  2003-04-22 15:00                   ` Corinna Vinschen
@ 2003-04-22 16:03                     ` Jason Tishler
  2003-04-22 17:25                       ` Corinna Vinschen
  0 siblings, 1 reply; 22+ messages in thread
From: Jason Tishler @ 2003-04-22 16:03 UTC (permalink / raw)
  To: cygwin

Corinna,

On Tue, Apr 22, 2003 at 02:12:32PM +0200, Corinna Vinschen wrote:
> On Tue, Apr 22, 2003 at 07:51:56AM -0400, Jason Tishler wrote:
> > However, I really recommend my vsftpd patch instead.  The port is
> > complete except for the binary/text mode part.  Do you want this
> > patch instead?
> 
> Jason, I hoped you would become maintainer for a vsftpd port as part
> of the Cygwin distro at one point.  What's up?

You know -- the standard excuse -- lack of time.  Sigh...

As I alluded to above, the port is complete except for the standard
binary/text issues.  Specifically, I know of the following problems:

    1. vsftpd.conf must be in binary mode on a binary mount
    2. file transfers from/to text mounts can cause "corruption"
    3. ASCII transfer mode does not seem to work properly

However, we have been using vsftpd (with everything binary) in a
production environment without any problems for months now.

I started to track down the above, but tabled them due to the lack of
progress (and motivation).

I'm willing to contribute vsftpd with the above caveats and the
intention to solve the binary/text issues as time permits.  Is this
acceptable?

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

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: proftpd (and vsftpd too)
  2003-04-22 16:03                     ` Jason Tishler
@ 2003-04-22 17:25                       ` Corinna Vinschen
  2003-05-05 17:58                         ` vsftpd corruption problem (Re: proftpd (and vsftpd too)) Jason Tishler
  0 siblings, 1 reply; 22+ messages in thread
From: Corinna Vinschen @ 2003-04-22 17:25 UTC (permalink / raw)
  To: cygwin

On Tue, Apr 22, 2003 at 10:42:25AM -0400, Jason Tishler wrote:
>     1. vsftpd.conf must be in binary mode on a binary mount
>     2. file transfers from/to text mounts can cause "corruption"
>     3. ASCII transfer mode does not seem to work properly
> [...]
> I'm willing to contribute vsftpd with the above caveats and the
> intention to solve the binary/text issues as time permits.  Is this
> acceptable?

As a "test" release, 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
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: proftpd
  2003-04-22 14:14                 ` proftpd Hannu E K Nevalainen (garbage mail)
@ 2003-04-23 12:26                   ` Gerrit P. Haase
  0 siblings, 0 replies; 22+ messages in thread
From: Gerrit P. Haase @ 2003-04-23 12:26 UTC (permalink / raw)
  To: Gerrit @ cygwin

Hallo Hannu,

If you really need an ftpd for Win98, there are the inetutils,
already available for Cygwin, included is also the ftpd.

BTW, it should be no problem to get it running without thew ntsec
features, but that is not what I want, if you really want to use
Win98 to setup FTP service for the internet freaks, then you're
lost...

NT gives you a little more security (well, I hope so).

Go and build Proftpd, just remove the wrong #ifdef __CYGWIN__ code
and write your password (encrypted) into your /etc/passwd file and
you have proftpd running on Cygwin/Win98.  Since it builds already
without problems, I'll focus now to get NTSEC up and running too.


Gerrit
-- 
=^..^=


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: proftpd (and vsftpd too)
  2003-04-22 14:58                 ` proftpd (and vsftpd too) Jason Tishler
  2003-04-22 15:00                   ` Corinna Vinschen
@ 2003-04-23 15:47                   ` Jason Tishler
  2003-04-23 21:07                     ` Gerrit P. Haase
  1 sibling, 1 reply; 22+ messages in thread
From: Jason Tishler @ 2003-04-23 15:47 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1189 bytes --]

Gerrit,

On Tue, Apr 22, 2003 at 07:51:56AM -0400, Jason Tishler wrote:
> On Tue, Apr 22, 2003 at 07:18:11AM +0200, Gerrit P. Haase wrote:
> > Lets see what Jason figured out.
> 
> [snip]
>
> I very quickly got passed the NT authentication part thanks to
> leveraging off of Corinna's inetutils work.  Unfortunately, I had a
> *lot* of trouble and spent *way* too much time trying to get proftpd
> to function properly after switching users.
> 
> For some reason after proftpd switched users, operation like ls and
> get/put would fail with strange errors (e.g., socket operation on a
> non-socket).
> [snip]

I finally found the error of my ways -- I was using system (i.e., 18)
for root's gid instead of administrators (i.e., 544).  This caused all
kinds of problems after proftpd executed a setgid(ROOT_GID).

> I can post my proftpd "patch" from my very stale CVS working
> directory.  Do you want it?

See attached.  Note that you can ignore the mod_unixpw.c hunks since you
indicated that you have already completed this part of the port.

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

[-- Attachment #2: cygwin3.patch --]
[-- Type: text/plain, Size: 6112 bytes --]

Index: include/privs.h
===================================================================
RCS file: /cvsroot/proftp/proftpd/include/privs.h,v
retrieving revision 1.11
diff -u -p -r1.11 privs.h
--- include/privs.h	28 Sep 2002 02:01:47 -0000	1.11
+++ include/privs.h	23 Apr 2003 11:40:52 -0000
@@ -45,6 +45,14 @@
  * doing this in here:
  */
 
+#ifdef __CYGWIN__
+#define ROOT_UID 18
+#define ROOT_GID 544
+#else
+#define ROOT_UID 0
+#define ROOT_GID 0
+#endif
+
 #ifdef __hpux
 #define setreuid(x,y) setresuid(x,y,0)
 #endif
@@ -147,7 +155,7 @@
 #define PRIVS_SETUP(u, g) \
   { \
     log_debug(DEBUG8, "SETUP PRIVS at %s:%d", __FILE__, __LINE__); \
-    if (getuid()) { \
+    if (getuid() != ROOT_UID) { \
       session.ouid = session.uid = getuid(); \
       session.gid = getgid(); \
       if (setgid(session.gid)) \
@@ -163,7 +171,7 @@
       session.ouid = getuid(); \
       session.uid = (u); \
       session.gid = (g); \
-      if (setuid(0)) \
+      if (setuid(ROOT_UID)) \
         log_pri(LOG_ERR, "PRIVS_SETUP: unable to setuid(): %s", \
           strerror(errno)); \
       if (setgid((g))) \
@@ -180,7 +188,7 @@
 #define PRIVS_ROOT \
   if (!session.disable_id_switching) { \
     log_debug(DEBUG8, "ROOT PRIVS at %s:%d", __FILE__, __LINE__); \
-    if (seteuid(0)) \
+    if (seteuid(ROOT_UID)) \
       log_pri(LOG_ERR, "PRIVS_ROOT: unable to seteuid(): %s", \
         strerror(errno)); \
   }
@@ -189,14 +197,14 @@
  */
 #define PRIVS_USER \
   if (!session.disable_id_switching) { \
-    if (session.login_uid == 0) { \
+    if (session.login_uid == ROOT_UID) { \
       log_debug(DEBUG1, "Use of PRIVS_USER before session.login_uid set " \
         "in %s %d", __FILE__, __LINE__); \
     } else { \
       log_debug(DEBUG8, "USER PRIVS %d at %s:%d", (int) session.login_uid, \
         __FILE__, __LINE__); \
-      if (seteuid(0)) \
-        log_pri(LOG_ERR, "PRIVS_USER: unable to seteuid(0): %s", \
+      if (seteuid(ROOT_UID)) \
+        log_pri(LOG_ERR, "PRIVS_USER: unable to seteuid(ROOT_UID): %s", \
           strerror(errno)); \
       if (seteuid(session.login_uid)) \
         log_pri(LOG_ERR, "PRIVS_USER: unable to seteuid(session.login_uid): " \
@@ -208,9 +216,9 @@
  */
 #define PRIVS_RELINQUISH \
   if (!session.disable_id_switching) { \
-    if (geteuid() != 0) { \
-      if (seteuid(0)) \
-        log_pri(LOG_ERR, "PRIVS_RELINQUISH: unable to seteuid(0): %s", \
+    if (geteuid() != ROOT_UID) { \
+      if (seteuid(ROOT_UID)) \
+        log_pri(LOG_ERR, "PRIVS_RELINQUISH: unable to seteuid(ROOT_UID): %s", \
           strerror(errno)); \
     } \
     log_debug(DEBUG8, "RELINQUISH PRIVS at %s:%d", __FILE__, __LINE__); \
@@ -224,7 +232,7 @@
 #define PRIVS_REVOKE \
   { \
     log_debug(DEBUG8, "REVOKE PRIVS at %s:%d", __FILE__, __LINE__); \
-    if (seteuid(0)) \
+    if (seteuid(ROOT_UID)) \
       log_pri(LOG_ERR, "PRIVS_REVOKE: unable to seteuid(): %s", \
         strerror(errno)); \
     if (setgid(session.gid)) \
Index: modules/mod_auth.c
===================================================================
RCS file: /cvsroot/proftp/proftpd/modules/mod_auth.c,v
retrieving revision 1.101
diff -u -p -r1.101 mod_auth.c
--- modules/mod_auth.c	5 Nov 2002 19:06:57 -0000	1.101
+++ modules/mod_auth.c	23 Apr 2003 11:40:54 -0000
@@ -890,8 +890,8 @@ static int _setup_environment(pool *p, c
     setresuid(0,0,0);
     setresgid(0,0,0);
 #else
-    setuid(0);
-    setgid(0);
+    setuid(ROOT_UID);
+    setgid(ROOT_GID);
 #endif
     PRIVS_SETUP(pw->pw_uid, pw->pw_gid)
 
@@ -919,8 +919,8 @@ static int _setup_environment(pool *p, c
     setresuid(0,0,0);
     setresgid(0,0,0);
 #else
-    setuid(0);
-    setgid(0);
+    setuid(ROOT_UID);
+    setgid(ROOT_GID);
 #endif
     PRIVS_SETUP(daemon_uid, daemon_gid)
 
@@ -1113,8 +1113,8 @@ static int _setup_environment(pool *p, c
 
   PRIVS_ROOT
 
-  setuid(0);
-  setgid(0);
+  setuid(ROOT_UID);
+  setgid(ROOT_GID);
 
   PRIVS_SETUP(pw->pw_uid, pw->pw_gid)
 
Index: modules/mod_unixpw.c
===================================================================
RCS file: /cvsroot/proftp/proftpd/modules/Attic/mod_unixpw.c,v
retrieving revision 1.24
diff -u -p -r1.24 mod_unixpw.c
--- modules/mod_unixpw.c	21 Oct 2002 17:06:10 -0000	1.24
+++ modules/mod_unixpw.c	23 Apr 2003 11:40:54 -0000
@@ -38,6 +38,22 @@
 #include <crypt.h>
 #endif
 
+/* Cygwin specific typedefs, defines, and prototypes.
+ */
+
+#ifdef CYGWIN
+typedef void *HANDLE;
+typedef unsigned long DWORD;
+#define INVALID_HANDLE_VALUE (HANDLE)(-1)
+#define WINAPI __stdcall
+DWORD WINAPI GetVersion(void);
+extern HANDLE cygwin_logon_user (const struct passwd *, const char *);
+extern void cygwin_set_impersonation_token (const HANDLE);
+#define is_winnt (GetVersion() < 0x80000000)
+#else
+#define is_winnt (0)
+#endif
+
 #ifdef USE_SHADOW
 #include <shadow.h>
 #endif
@@ -608,8 +624,17 @@ MODRET pw_check(cmd_rec *cmd) {
   const char *cpw = cmd->argv[0];
   const char *pw = cmd->argv[2];
 
-  if(strcmp(crypt(pw,cpw),cpw) != 0)
-    return ERROR(cmd);
+  if (is_winnt) {
+    struct passwd *entry = p_getpwnam(cmd->argv[1]);
+    HANDLE token = cygwin_logon_user(entry, pw);
+    cygwin_set_impersonation_token(token);
+    if (token == INVALID_HANDLE_VALUE)
+      return ERROR(cmd);
+  }
+  else {
+    if(strcmp(crypt(pw,cpw),cpw) != 0)
+      return ERROR(cmd);
+  }
 
   return HANDLED(cmd);
 }
Index: src/main.c
===================================================================
RCS file: /cvsroot/proftp/proftpd/src/main.c,v
retrieving revision 1.128
diff -u -p -r1.128 main.c
--- src/main.c	28 Oct 2002 16:51:50 -0000	1.128
+++ src/main.c	23 Apr 2003 11:40:56 -0000
@@ -3058,15 +3058,15 @@ int main(int argc, char *argv[], char **
     if (uid)
       daemon_uid = *uid;
     else
-      daemon_uid = 0;
+      daemon_uid = ROOT_UID;
  
     if (gid)
       daemon_gid = *gid;
     else
-      daemon_gid = 0;
+      daemon_gid = ROOT_GID;
   }
 
-  if (daemon_uid) {
+  if (daemon_uid != ROOT_UID) {
     /* allocate space for daemon supplemental groups
      */
     daemon_gids = make_array(permanent_pool, 2, sizeof(gid_t));


[-- Attachment #3: Type: text/plain, Size: 218 bytes --]

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: proftpd (and vsftpd too)
  2003-04-23 15:47                   ` proftpd (and vsftpd too) Jason Tishler
@ 2003-04-23 21:07                     ` Gerrit P. Haase
  0 siblings, 0 replies; 22+ messages in thread
From: Gerrit P. Haase @ 2003-04-23 21:07 UTC (permalink / raw)
  To: cygwin

Hallo Jason,

Am Mittwoch, 23. April 2003 um 13:55 schriebst du:

> Gerrit,

> On Tue, Apr 22, 2003 at 07:51:56AM -0400, Jason Tishler wrote:
>> On Tue, Apr 22, 2003 at 07:18:11AM +0200, Gerrit P. Haase wrote:
>> > Lets see what Jason figured out.
[snip]

> I finally found the error of my ways -- I was using system (i.e., 18)
> for root's gid instead of administrators (i.e., 544).  This caused all
> kinds of problems after proftpd executed a setgid(ROOT_GID).

>> I can post my proftpd "patch" from my very stale CVS working
>> directory.  Do you want it?

> See attached.  Note that you can ignore the mod_unixpw.c hunks since you
> indicated that you have already completed this part of the port.

I'll consider this too, I changed mod_auth.c as it already was
included in mod_auth in the current CVS version of proftpd.

Anyway, many thanks.


Gerrit
-- 
=^..^=


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 22+ messages in thread

* vsftpd corruption problem (Re: proftpd (and vsftpd too))
  2003-04-22 17:25                       ` Corinna Vinschen
@ 2003-05-05 17:58                         ` Jason Tishler
  2003-05-05 20:45                           ` Hannu E K Nevalainen (garbage mail)
  0 siblings, 1 reply; 22+ messages in thread
From: Jason Tishler @ 2003-05-05 17:58 UTC (permalink / raw)
  To: cygwin

On Tue, Apr 22, 2003 at 05:38:12PM +0200, Corinna Vinschen wrote:
> On Tue, Apr 22, 2003 at 10:42:25AM -0400, Jason Tishler wrote:
> >     1. vsftpd.conf must be in binary mode on a binary mount
> >     2. file transfers from/to text mounts can cause "corruption"
> >     3. ASCII transfer mode does not seem to work properly
> > [...]
> > I'm willing to contribute vsftpd with the above caveats and the
> > intention to solve the binary/text issues as time permits.  Is this
> > acceptable?
> 
> As a "test" release, sure!

I may have to renege on the above offer or at least add a *big* caveat
to the README.  Over the last few months, we have transferred tens of
thousands (possibly hundreds of thousands) of "normal" sized (i.e.,
<=100K) files with vsftpd put tunneled through ssh without any problems.
Unfortunately, I have recently discovered a corruption problem when
transferring large files (i.e., >=200MB) with vsftpd get tunneled
through ssh.

So far, I have been able to only trigger the problem on 4-way, NT 4.0
boxes with get when tunneled through ssh on a "slowish" (e.g., ~600
KB/s) network connection.  I cannot reproduce the problem on 1-way
systems, 2000, without ssh, put, or fast network connections (e.g., same
switch).

By constructing a specially formating file, I was able to determine that
after about 150 MB is transferred, a chunk of the file is erroneously
resent.

The special file contains lines with the following format:

    LLLLLLL:12345678901234567890123456789012345678901

where LLLLLLL is the line number zero padded to 7 digits.

The corruption looks like the following:

    3327913:12345678901234567890123456789012345678901
    3327914:12345678901234567890123456789012345678901
    3327915:12345678901234567890123456789012345678901
    3327916:12345678901234567890123456789012345678901
    3327917:12345678901234567890123456789012345678901
    33271234567890123456789012345678901
    3326608:12345678901234567890123456789012345678901
    3326609:12345678901234567890123456789012345678901
    3326610:12345678901234567890123456789012345678901
    3326611:12345678901234567890123456789012345678901
    3326612:12345678901234567890123456789012345678901

So in this case, after starting to transfer line 3327918, for some
reason vsftpd started to transfer data from line 3326607 and onward
again.  But, the file is otherwise not corrupt.  BTW, I have noticed a
200 MB file will be exactly 64 KB larger and a 300 MB file will be
exactly 128 KB larger.

Any ideas on how to debug this further will be greatly appreciate.

BTW, since proftpd CVS works under Cygwin now, should I just give up on
vsftpd and save my head banging for other more productive activities?

Thanks,
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

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 22+ messages in thread

* RE: vsftpd corruption problem (Re: proftpd (and vsftpd too))
  2003-05-05 17:58                         ` vsftpd corruption problem (Re: proftpd (and vsftpd too)) Jason Tishler
@ 2003-05-05 20:45                           ` Hannu E K Nevalainen (garbage mail)
  2003-05-06 11:20                             ` Jason Tishler
  0 siblings, 1 reply; 22+ messages in thread
From: Hannu E K Nevalainen (garbage mail) @ 2003-05-05 20:45 UTC (permalink / raw)
  To: cygwin

> From: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com]On Behalf
> Of Jason Tishler

--8<--
> By constructing a specially formating file, I was able to determine that
> after about 150 MB is transferred, a chunk of the file is erroneously
> resent.
--8<--
> again.  But, the file is otherwise not corrupt.  BTW, I have noticed a
> 200 MB file will be exactly 64 KB larger and a 300 MB file will be
> exactly 128 KB larger.
> 
> Any ideas on how to debug this further will be greatly appreciate.

$ echo $(( $(( 150 * 1024 )) / 64 ))
2400

Wild guesses:
 Does "2400" appear as a constant anywhere near transfer buffer counts
or some such?
 C/C++ "%" operator in use near buffers?

/Hannu E K Nevalainen, Mariefred, Sweden
 

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: vsftpd corruption problem (Re: proftpd (and vsftpd too))
  2003-05-05 20:45                           ` Hannu E K Nevalainen (garbage mail)
@ 2003-05-06 11:20                             ` Jason Tishler
  0 siblings, 0 replies; 22+ messages in thread
From: Jason Tishler @ 2003-05-06 11:20 UTC (permalink / raw)
  To: cygwin

On Mon, May 05, 2003 at 10:44:44PM +0200, Hannu E K Nevalainen mail) wrote:
> > Any ideas on how to debug this further will be greatly appreciate.
> 
> $ echo $(( $(( 150 * 1024 )) / 64 ))
> 2400
> 
> Wild guesses:
>  Does "2400" appear as a constant anywhere near transfer buffer counts
>  or some such?
>  C/C++ "%" operator in use near buffers?

I don't about either of the above, but the corruption does not appear at
the same place every time.  So, I think that the problem is a race or
timeout -- not something as simple as an overflow.

I forgot to mention the following data points in my previous post:

    1. vsftpd thinks that it transferred the correct number of bytes as
       indicated by its log file.
    2. proftpd does not exhibit this problem

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

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2003-05-06 11:20 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-13  2:54 inetutils ftpd fcntl(F_SETOWN) failure message suppression patch Jason Tishler
2003-01-13  3:04 ` Corinna Vinschen
2003-01-13  3:30   ` Jason Tishler
2003-01-13  3:30     ` Christopher Faylor
2003-01-13  3:30       ` Corinna Vinschen
2003-01-13 15:33         ` Jason Tishler
2003-04-22  2:10           ` proftpd (was: Re: inetutils ftpd fcntl(F_SETOWN) failure message suppression patch) Gerrit P. Haase
2003-04-22  4:50             ` Corinna Vinschen
2003-04-22  9:21               ` proftpd Gerrit P. Haase
2003-04-22  9:41                 ` proftpd Gerrit P. Haase
2003-04-22 14:40                   ` proftpd Corinna Vinschen
2003-04-22 14:14                 ` proftpd Hannu E K Nevalainen (garbage mail)
2003-04-23 12:26                   ` proftpd Gerrit P. Haase
2003-04-22 14:58                 ` proftpd (and vsftpd too) Jason Tishler
2003-04-22 15:00                   ` Corinna Vinschen
2003-04-22 16:03                     ` Jason Tishler
2003-04-22 17:25                       ` Corinna Vinschen
2003-05-05 17:58                         ` vsftpd corruption problem (Re: proftpd (and vsftpd too)) Jason Tishler
2003-05-05 20:45                           ` Hannu E K Nevalainen (garbage mail)
2003-05-06 11:20                             ` Jason Tishler
2003-04-23 15:47                   ` proftpd (and vsftpd too) Jason Tishler
2003-04-23 21:07                     ` Gerrit P. Haase

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).