Hi all, These patches fix two segmentation fault and abort signal problems which we encountered in our use case of syslog-ng 2.0.8. Patch 1: "syslog-ng-2.0.8-refcounter.diff". If specifying more than about 256 "destination" directives inside one log directive, then the reference counter of a log message wraps. The reference counter width of LogMessage is expanded from 8 bit to unsigned int (32 bit). Reason: The reference counter wraps after 256 increments, which causes an abort() call when decrementing the reference counter below 0 at a later time. The additional 3 bytes per message in memory seem to be affordable. Patch 2: "syslog-ng-2.0.8-group.diff". Handling of "-g" and "-u" options is not mutual exclusive: If group is specified on the command line, but not the user, then the user is a NULL pointer. Calling initgroups() with a null pointer segfaults in our case. And once again, many thanks to Bazsi for the syslog-ng software. -- Roger -- --------------------------------------------------------------- addr://Kasinostrasse 30, CH-5001 Aarau fon://++41 62 823 9355 http://www.terreactive.com fax://++41 62 823 9356 --------------------------------------------------------------- Wir sichern Ihren Erfolg. terreActive AG --------------------------------------------------------------- --- syslog-ng-2.0.8-orig/src/logmsg.h 2008-01-26 16:15:14 +0100 +++ syslog-ng-2.0.8/src/logmsg.h 2008-02-08 13:58:48 +0100 @@ -77,7 +77,7 @@ typedef struct _LogMessage { - guint8 ref_cnt; + guint ref_cnt; guint8 flags; guint8 pri; guint8 num_re_matches; --- syslog-ng-2.0.8-orig/src/main.c 2007-12-27 11:55:59 +0100 +++ syslog-ng-2.0.8/src/main.c 2008-02-08 18:31:49 +0100 @@ -287,7 +287,8 @@ if (uid || gid || run_as_user) { setgid(gid); - initgroups(run_as_user, gid); + if (run_as_user) + initgroups(run_as_user, gid); setuid(uid); } return 1;