All of lore.kernel.org
 help / color / mirror / Atom feed
* Change default error handling in libselinux matchpathcon to use syslog instead of stderr.
@ 2007-09-18 15:35 Daniel J Walsh
  2007-09-18 16:43 ` Stephen Smalley
  2007-09-18 17:09 ` Joshua Brindle
  0 siblings, 2 replies; 10+ messages in thread
From: Daniel J Walsh @ 2007-09-18 15:35 UTC (permalink / raw)
  To: Stephen Smalley, SE Linux

[-- 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 --]

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

end of thread, other threads:[~2007-09-19 17:12 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-18 15:35 Change default error handling in libselinux matchpathcon to use syslog instead of stderr Daniel J Walsh
2007-09-18 16:43 ` 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

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.