|
|
dcd9773 |
diff --exclude-from=exclude -N -u -r nsalibselinux/src/matchpathcon.c libselinux-2.0.35/src/matchpathcon.c
|
|
|
39606ee |
--- nsalibselinux/src/matchpathcon.c 2007-09-28 09:48:58.000000000 -0400
|
|
|
39606ee |
+++ libselinux-2.0.35/src/matchpathcon.c 2007-09-27 13:54:33.000000000 -0400
|
|
|
71cd138 |
@@ -2,6 +2,7 @@
|
|
|
71cd138 |
#include <string.h>
|
|
|
71cd138 |
#include <errno.h>
|
|
|
71cd138 |
#include <stdio.h>
|
|
|
71cd138 |
+#include <syslog.h>
|
|
|
71cd138 |
#include "selinux_internal.h"
|
|
|
71cd138 |
#include "label_internal.h"
|
|
|
71cd138 |
#include "callbacks.h"
|
|
|
0fa749d |
@@ -57,7 +58,7 @@
|
|
|
71cd138 |
{
|
|
|
71cd138 |
va_list ap;
|
|
|
71cd138 |
va_start(ap, fmt);
|
|
|
71cd138 |
- vfprintf(stderr, fmt, ap);
|
|
|
0fa749d |
+ vsyslog(LOG_ERR, fmt, ap);
|
|
|
71cd138 |
va_end(ap);
|
|
|
71cd138 |
}
|
|
|
71cd138 |
|
|
|
39606ee |
%module selinux
|
|
|
dcd9773 |
diff --exclude-from=exclude -N -u -r nsalibselinux/utils/matchpathcon.c libselinux-2.0.35/utils/matchpathcon.c
|
|
|
0fa749d |
--- nsalibselinux/utils/matchpathcon.c 2007-07-16 14:20:45.000000000 -0400
|
|
|
39606ee |
+++ libselinux-2.0.35/utils/matchpathcon.c 2007-09-27 13:54:33.000000000 -0400
|
|
|
0fa749d |
@@ -17,10 +17,24 @@
|
|
|
0fa749d |
exit(1);
|
|
|
0fa749d |
}
|
|
|
0fa749d |
|
|
|
0fa749d |
+static void
|
|
|
0fa749d |
+#ifdef __GNUC__
|
|
|
0fa749d |
+ __attribute__ ((format(printf, 1, 2)))
|
|
|
0fa749d |
+#endif
|
|
|
0fa749d |
+ myprintf(const char *fmt, ...)
|
|
|
0fa749d |
+{
|
|
|
0fa749d |
+ va_list ap;
|
|
|
0fa749d |
+ va_start(ap, fmt);
|
|
|
0fa749d |
+ vfprintf(stderr, fmt, ap);
|
|
|
0fa749d |
+ va_end(ap);
|
|
|
0fa749d |
+}
|
|
|
0fa749d |
+
|
|
|
0fa749d |
int printmatchpathcon(char *path, int header, int mode)
|
|
|
0fa749d |
{
|
|
|
0fa749d |
char *buf;
|
|
|
0fa749d |
- int rc = matchpathcon(path, mode, &buf;;
|
|
|
0fa749d |
+ int rc;
|
|
|
0fa749d |
+ set_matchpathcon_printf(myprintf);
|
|
|
0fa749d |
+ rc = matchpathcon(path, mode, &buf;;
|
|
|
0fa749d |
if (rc < 0) {
|
|
|
0fa749d |
fprintf(stderr, "matchpathcon(%s) failed: %s\n", path,
|
|
|
0fa749d |
strerror(errno));
|