All of lore.kernel.org
 help / color / mirror / Atom feed
* Matchpathcon patch to print <<none>> when it gets enoent.
@ 2009-07-07 16:30 Daniel J Walsh
  2009-09-24 19:20 ` Joshua Brindle
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel J Walsh @ 2009-07-07 16:30 UTC (permalink / raw)
  To: SE Linux

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: libselinux-matchpathcon.patch --]
[-- Type: text/plain, Size: 655 bytes --]

Subject: [PATCH] refpolicy: nsalibselinux_utils_matchpathcon.c changes
--text follows this line--
--- nsalibselinux/utils/matchpathcon.c	2009-07-07 11:10:42.033956000 -0400
+++ libselinux-2.0.83/utils/matchpathcon.c	2009-07-07 12:22:39.395209000 -0400
@@ -22,9 +22,13 @@
 	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("<<none>>");
+		} else {
+			fprintf(stderr, "matchpathcon(%s) failed: %s\n", path,
+				strerror(errno));
+			return 1;
+		}
 	}
 	if (header)
 		printf("%s\t%s\n", path, buf);

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Matchpathcon patch to print <<none>> when it gets enoent.
  2009-07-07 16:30 Matchpathcon patch to print <<none>> when it gets enoent Daniel J Walsh
@ 2009-09-24 19:20 ` Joshua Brindle
  0 siblings, 0 replies; 2+ messages in thread
From: Joshua Brindle @ 2009-09-24 19:20 UTC (permalink / raw)
  To: Daniel J Walsh; +Cc: SE Linux



Daniel J Walsh wrote:
>


Merged in libselinux-2.0.87

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-09-24 19:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-07 16:30 Matchpathcon patch to print <<none>> when it gets enoent Daniel J Walsh
2009-09-24 19:20 ` Joshua Brindle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.