bug-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-inetutils] Bug with patch: inetutils 1.4.1 and 1.4.2 in syslogd -


From: Peter Rehley
Subject: [bug-inetutils] Bug with patch: inetutils 1.4.1 and 1.4.2 in syslogd - inet sockets don't work
Date: Wed, 12 Feb 2003 11:59:49 -0800

Hello,

Found that inet sockets don't work and it appears that the reason is because
the init (0) is called after create_inet_socket.  The init function sets
LogPort which is used by create_inet_socket.  Given the way things are
currently, create_inet_socket uses a LogPort = 0, which tells bind  to
pick some random port to use.

Below is the patch to correct the problem:

diff -durpN 1.4.2/syslogd.c new/syslogd.c
--- 1.4.2/syslogd.c    Wed Dec 11 04:38:00 2002
+++ new/syslogd.c      Mon Feb  3 16:07:03 2003
@@ -557,6 +557,9 @@ main (int argc, char *argv[])
       exit (2);
     }

+  /* read configuration file */
+  init (0);
+
 #ifdef PATH_KLOG
   /* Initialize kernel logging and add to the list.  */
   if (!NoKLog)
@@ -607,9 +610,6 @@ main (int argc, char *argv[])
       else
        dbg_printf ("Can't open UDP port: %s\n", strerror (errno));
     }
-
-  /* read configuration file */
-  init (0);

   /* Tuck my process id away.  */
   fp = fopen (PidFile, "w");

Peter

=====

Infinity Softworks. Making scientific, financial and realtor calculators for Palm Pilots and other PDAs since 1997

Visit them today at http://www.infinitysw.com





reply via email to

[Prev in Thread] Current Thread [Next in Thread]