netfilter.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ulogd segfault on kill TERM
@ 2011-03-24 16:19 Salih Gönüllü
  2011-03-27 19:48 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: Salih Gönüllü @ 2011-03-24 16:19 UTC (permalink / raw)
  To: netfilter

Hi,

ulogd is segfaulting on kill TERM when logfile is set to 'syslog' in the 
configuration. Please find a patch below. Another point: Should stdout 
stay open on daemonize when logging to syslog ??



--- ulogd.c.orig        2011-03-24 15:45:34.000000000 +0100
+++ ulogd.c     2011-03-24 15:48:37.000000000 +0100
@@ -1047,7 +1047,7 @@
         unload_plugins();
  #endif

-       if (logfile != NULL  && logfile != stdout) {
+       if (logfile != NULL  && logfile != stdout && logfile != 
&syslog_dummy ) {
                 fclose(logfile);
                 logfile = NULL;
         }
@@ -1228,7 +1228,7 @@
                 if (fork()) {
                         exit(0);
                 }
-               if (logfile != stdout && logfile != &syslog_dummy)
+               if (logfile != stdout )
                         fclose(stdout);
                 fclose(stderr);
                 fclose(stdin);



Cheers,

    -salih

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: ulogd segfault on kill TERM
  2011-03-24 16:19 ulogd segfault on kill TERM Salih Gönüllü
@ 2011-03-27 19:48 ` Pablo Neira Ayuso
  0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2011-03-27 19:48 UTC (permalink / raw)
  To: Salih Gönüllü; +Cc: netfilter

On 24/03/11 17:19, Salih Gönüllü wrote:
> Hi,
> 
> ulogd is segfaulting on kill TERM when logfile is set to 'syslog' in the
> configuration. Please find a patch below.

I have applied the following patch.

http://git.netfilter.org/cgi-bin/gitweb.cgi?p=ulogd2.git;a=commit;h=c8fb552eeabd1a7cd9440d55c96918c0aa1ae3a9

> Another point: Should stdout
> stay open on daemonize when logging to syslog ??

this does make too much sense indeed.

Please, include a short description in your patches and add the
Signed-off-by tag. This makes easier to apply it with git-am.

Thanks Salih!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-03-27 19:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-24 16:19 ulogd segfault on kill TERM Salih Gönüllü
2011-03-27 19:48 ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).