[syslog-ng] usertty endutent fix

Bryan Henderson bryanh at giraffe-data.com
Mon Feb 12 01:40:30 CET 2007


Here's a fix for the usertty destination.  Without it, you get one
message to a user tty, then nothing, because the utmp database is
positioned at the end, so future getutents return "no more entries."

-- 
Bryan Henderson                                   San Jose, California


--- syslog-ng-2.0.2+20070202/src/afuser.c	2007-02-01 23:11:48.000000000 +0000
+++ syslog-ng/src/afuser.c	2007-02-12 00:28:32.000000000 +0000
@@ -87,6 +140,7 @@
             }
         }
     }
+  endutent();
   if ((path_flags & PF_FLOW_CTL_OFF) == 0)
     log_msg_ack(msg);
   log_msg_unref(msg);


More information about the syslog-ng mailing list