- Turn off error printing in library. Need to compile with DEBUG to get it

back
This commit is contained in:
Daniel J Walsh 2006-06-21 18:33:13 +00:00
parent 2d9b36b51e
commit f4b45ddd03
2 changed files with 19 additions and 8 deletions

View File

@ -56,9 +56,17 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/matchpathcon.8 libse
This manual page was written by Dan Walsh <dwalsh@redhat.com>.
diff --exclude-from=exclude -N -u -r nsalibselinux/src/matchpathcon.c libselinux-1.30.15/src/matchpathcon.c
--- nsalibselinux/src/matchpathcon.c 2006-05-18 12:11:17.000000000 -0400
+++ libselinux-1.30.15/src/matchpathcon.c 2006-06-20 15:37:25.000000000 -0400
@@ -26,6 +26,8 @@
+++ libselinux-1.30.15/src/matchpathcon.c 2006-06-21 14:31:19.000000000 -0400
@@ -20,12 +20,16 @@
#endif
default_printf(const char *fmt, ...)
{
+#ifdef DEBUG
va_list ap;
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
va_end(ap);
+#endif
}
+static unsigned int myflags;
@ -66,7 +74,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/matchpathcon.c libselinux
static void
#ifdef __GNUC__
__attribute__ ((format (printf, 1, 2)))
@@ -50,7 +52,12 @@
@@ -50,7 +54,12 @@
static int default_canoncon(const char *path, unsigned lineno, char **context)
{
char *tmpcon;
@ -80,7 +88,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/matchpathcon.c libselinux
if (errno == ENOENT)
return 0;
if (lineno)
@@ -74,8 +81,6 @@
@@ -74,8 +83,6 @@
mycanoncon = &default_canoncon;
}
@ -89,7 +97,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/matchpathcon.c libselinux
void set_matchpathcon_flags(unsigned int flags)
{
myflags = flags;
@@ -580,7 +585,6 @@
@@ -580,7 +587,6 @@
spec_arr[nspec].context_valid = 1;
}
}
@ -97,7 +105,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/matchpathcon.c libselinux
spec_arr[nspec].context = context;
/* Determine if specification has
@@ -797,7 +801,6 @@
@@ -797,7 +803,6 @@
errno = ENOENT;
return -1;
}
@ -105,7 +113,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/matchpathcon.c libselinux
spec_arr[i].matches++;
return i;
@@ -877,3 +880,73 @@
@@ -877,3 +882,73 @@
}
}
}

View File

@ -2,7 +2,7 @@
Summary: SELinux library and simple utilities
Name: libselinux
Version: 1.30.15
Release: 3
Release: 4
License: Public domain (uncopyrighted)
Group: System Environment/Libraries
Source: http://www.nsa.gov/selinux/archives/%{name}-%{version}.tgz
@ -117,6 +117,9 @@ exit 0
%{_libdir}/python*/site-packages/selinux.py*
%changelog
* Wed Jun 21 2006 Dan Walsh <dwalsh@redhat.com> 1.30.15-4
- Turn off error printing in library. Need to compile with DEBUG to get it back
* Wed Jun 21 2006 Dan Walsh <dwalsh@redhat.com> 1.30.15-3
- Fix error reporting of matchpathcon