Bug 60290 - logs invalid client address in server_init function
logs invalid client address in server_init function
Status: CLOSED RAWHIDE
Product: Red Hat Raw Hide
Classification: Retired
Component: imap (Show other bugs)
1.0
i686 Linux
medium Severity low
: ---
: ---
Assigned To: Mike A. Harris
David Lawrence
:
Depends On:
Blocks: 61901 67218
  Show dependency treegraph
 
Reported: 2002-02-24 08:17 EST by Andrey V Khavryuchenko
Modified: 2007-04-18 12:40 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-06-21 16:16:40 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Andrey V Khavryuchenko 2002-02-24 08:17:13 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.0.3 (X11; Linux i686; U;) Gecko/20020215

Description of problem:
When pop3d at 10.0.2.2. is queried from host 10.0.2.3 the current rpm version
logs the following:

Feb 24 10:02:03 netmaster ipop3d[21788]: pop3 service init from 10.0.2.2



Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Install imap-2001a-6
2. Enable pop3 service in /etc/xinetd.d/ipop3
3. Contact pop3 service from non-local host
	

Actual Results:  Feb 24 10:02:03 netmaster ipop3d[21788]: pop3 service init from
10.0.2.2


Expected Results:  Feb 24 10:02:03 netmaster ipop3d[21788]: pop3 service init
from 10.0.2.3

Additional info:

Here's the patch that works for me:

--- imap-2001a/src/osdep/unix/env_unix.c~	Tue Feb 19 23:21:26 2002
+++ imap-2001a/src/osdep/unix/env_unix.c	Sun Feb 24 14:50:22 2002
@@ -401,9 +401,13 @@
     /* Don't use tcp_clienthost() since reverse DNS problems may slow down the
      * greeting message and cause the client to time out.
      */
-    char *client =
+    char client[256];
+    strncpy( client, 
       getpeername (0,(struct sockaddr *) &sin,(void *) &i) ? "UNKNOWN" :
-
((sin.sin_family == AF_INET) ? inet_ntoa (sin.sin_addr) : "NON-IPv4");
+             ((sin.sin_family == AF_INET) ? 
+              inet_ntoa (sin.sin_addr) : 
+              "NON-IPv4"),
+             sizeof(client) );
 
			/* set server name in syslog */
     openlog (server,LOG_PID,LOG_MAIL);
     fclose (stderr);		/* possibly save a process ID */
Comment 1 Mike A. Harris 2002-07-31 06:15:19 EDT
Fixed in imap-2001a-14 in rawhide.  Thanks for the patch.

Comment 2 Michael Fulbright 2002-12-20 12:38:25 EST
Time tracking values updated

Note You need to log in before you can comment on or make changes to this bug.