From: Daniel J Walsh <dwalsh@redhat.com>
To: Stephen Smalley <sds@tycho.nsa.gov>, SE Linux <selinux@tycho.nsa.gov>
Subject: Change default error handling in libselinux matchpathcon to use syslog instead of stderr.
Date: Tue, 18 Sep 2007 11:35:04 -0400 [thread overview]
Message-ID: <46EFF028.4040500@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 411 bytes --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Current behavior causes problems with network applications.
https://bugzilla.redhat.com/show_bug.cgi?id=273081
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFG7/AnrlYvE4MpobMRAksuAJ4uqcUDsSlB9uEpXePUEje39kNAywCeJbDE
sZ99tA7s4PgSxD/RnS4MHdg=
=g4kG
-----END PGP SIGNATURE-----
[-- Attachment #2: diff --]
[-- Type: text/plain, Size: 702 bytes --]
diff --exclude-from=exclude -N -u -r nsalibselinux/src/matchpathcon.c libselinux-2.0.33/src/matchpathcon.c
--- nsalibselinux/src/matchpathcon.c 2007-08-10 11:58:34.000000000 -0400
+++ libselinux-2.0.33/src/matchpathcon.c 2007-09-18 11:28:07.000000000 -0400
@@ -2,6 +2,7 @@
#include <string.h>
#include <errno.h>
#include <stdio.h>
+#include <syslog.h>
#include "selinux_internal.h"
#include "label_internal.h"
#include "callbacks.h"
@@ -55,10 +56,12 @@
#endif
default_printf(const char *fmt, ...)
{
+ char buf[BUFSIZ];
va_list ap;
va_start(ap, fmt);
- vfprintf(stderr, fmt, ap);
+ vsnprintf(buf, sizeof(buf) - 1, fmt, ap);
va_end(ap);
+ syslog(LOG_ERR, buf, strlen(buf));
}
void
[-- Attachment #3: diff.sig --]
[-- Type: application/octet-stream, Size: 65 bytes --]
next reply other threads:[~2007-09-18 15:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-18 15:35 Daniel J Walsh [this message]
2007-09-18 16:43 ` Change default error handling in libselinux matchpathcon to use syslog instead of stderr Stephen Smalley
2007-09-18 19:47 ` Daniel J Walsh
2007-09-18 17:09 ` Joshua Brindle
2007-09-18 17:23 ` Stephen Smalley
2007-09-18 17:43 ` Joshua Brindle
2007-09-18 17:45 ` Stephen Smalley
2007-09-18 19:54 ` Daniel J Walsh
2007-09-19 14:03 ` Stephen Smalley
2007-09-19 17:12 ` Eamon Walsh
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=46EFF028.4040500@redhat.com \
--to=dwalsh@redhat.com \
--cc=sds@tycho.nsa.gov \
--cc=selinux@tycho.nsa.gov \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.