From 00f0d550d556ec4cda88cc89aa5a63e6aa043fad Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Thu, 24 Sep 2009 15:01:53 -0400 Subject: [PATCH] Author: Daniel J Walsh Email: dwalsh@redhat.com Subject: refpolicy: nsalibselinux_utils_matchpathcon.c changes Date: Tue, 07 Jul 2009 12:30:52 -0400 --text follows this line-- Signed-off-by: Joshua Brindle --- libselinux/utils/matchpathcon.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/libselinux/utils/matchpathcon.c b/libselinux/utils/matchpathcon.c index c57f6ca8..4453a885 100644 --- a/libselinux/utils/matchpathcon.c +++ b/libselinux/utils/matchpathcon.c @@ -22,9 +22,13 @@ int printmatchpathcon(char *path, int header, int mode) char *buf; int rc = matchpathcon(path, mode, &buf); if (rc < 0) { - fprintf(stderr, "matchpathcon(%s) failed: %s\n", path, - strerror(errno)); - return 1; + if (errno == ENOENT) { + buf=strdup("<>"); + } else { + fprintf(stderr, "matchpathcon(%s) failed: %s\n", path, + strerror(errno)); + return 1; + } } if (header) printf("%s\t%s\n", path, buf);