netfilter.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Salih Gönüllü" <sag@open.ch>
To: netfilter@vger.kernel.org
Subject: ulogd segfault on kill TERM
Date: Thu, 24 Mar 2011 17:19:44 +0100	[thread overview]
Message-ID: <4D8B6F20.4010205@open.ch> (raw)

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

             reply	other threads:[~2011-03-24 16:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-24 16:19 Salih Gönüllü [this message]
2011-03-27 19:48 ` ulogd segfault on kill TERM Pablo Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D8B6F20.4010205@open.ch \
    --to=sag@open.ch \
    --cc=netfilter@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).