delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/01/03/08:26:35

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Fri, 03 Jan 2003 08:32:22 -0500
From: Jason Tishler <jason AT tishler DOT net>
Subject: inetutils ftpd fcntl(F_SETOWN) failure message suppression patch
To: Cygwin <cygwin AT cygwin DOT com>
Mail-followup-to: Cygwin <cygwin AT cygwin DOT com>
Message-id: <20030103133222.GA1712@tishler.net>
MIME-version: 1.0
User-Agent: Mutt/1.4i

--Boundary_(ID_VLcy0UmB+1zl7W/lsDd0FQ)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-disposition: inline

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

--Boundary_(ID_VLcy0UmB+1zl7W/lsDd0FQ)
Content-type: text/plain; charset=us-ascii; NAME=ftpd.c.diff
Content-transfer-encoding: 7BIT
Content-disposition: attachment; filename=ftpd.c.diff

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

--Boundary_(ID_VLcy0UmB+1zl7W/lsDd0FQ)
Content-type: text/plain; charset=us-ascii; NAME=ftpd.c.ChangeLog
Content-transfer-encoding: 7BIT
Content-disposition: attachment; filename=ftpd.c.ChangeLog

2003-01-03  Jason Tishler  <jason AT tishler DOT 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.


--Boundary_(ID_VLcy0UmB+1zl7W/lsDd0FQ)
Content-Type: text/plain; charset=us-ascii

--
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/
--Boundary_(ID_VLcy0UmB+1zl7W/lsDd0FQ)--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019