libselinux/libselinux-rhat.patch

26 lines
702 B
Diff
Raw Normal View History

2007-09-18 15:37:42 +00:00
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