mirror of
https://github.com/SELinuxProject/selinux
synced 2025-04-26 04:38:01 +00:00
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 <method@manicmethod.com>
This commit is contained in:
parent
94c51ba3b1
commit
00f0d550d5
@ -22,9 +22,13 @@ int printmatchpathcon(char *path, int header, int mode)
|
|||||||
char *buf;
|
char *buf;
|
||||||
int rc = matchpathcon(path, mode, &buf);
|
int rc = matchpathcon(path, mode, &buf);
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
fprintf(stderr, "matchpathcon(%s) failed: %s\n", path,
|
if (errno == ENOENT) {
|
||||||
strerror(errno));
|
buf=strdup("<<none>>");
|
||||||
return 1;
|
} else {
|
||||||
|
fprintf(stderr, "matchpathcon(%s) failed: %s\n", path,
|
||||||
|
strerror(errno));
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (header)
|
if (header)
|
||||||
printf("%s\t%s\n", path, buf);
|
printf("%s\t%s\n", path, buf);
|
||||||
|
Loading…
Reference in New Issue
Block a user