Bug 60290 - logs invalid client address in server_init function
Summary: logs invalid client address in server_init function
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: imap
Version: 1.0
Hardware: i686
OS: Linux
medium
low
Target Milestone: ---
Assignee: Mike A. Harris
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks: 61901 67218
TreeView+ depends on / blocked
 
Reported: 2002-02-24 13:17 UTC by Andrey V Khavryuchenko
Modified: 2007-04-18 16:40 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-06-21 20:16:40 UTC
Embargoed:


Attachments (Terms of Use)

Description Andrey V Khavryuchenko 2002-02-24 13:17:13 UTC
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 10:15:19 UTC
Fixed in imap-2001a-14 in rawhide.  Thanks for the patch.



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


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