All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch matchpathcon to eliminate file "/"
@ 2009-03-04 20:39 Daniel J Walsh
  2009-04-16 21:39 ` Chad Sellers
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel J Walsh @ 2009-03-04 20:39 UTC (permalink / raw)
  To: SE Linux

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

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

So

matchpathcon /etc/
Will work the same as
matchpathcon /etc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkmu5wMACgkQrlYvE4MpobNK4gCgiVeXXEZcCMsJKXM7jqh6r1u3
OScAoLcmXBIR63gpvA8RS3g07pcPC6IF
=e+Re
-----END PGP SIGNATURE-----

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

--- nsalibselinux/utils/matchpathcon.c	2008-10-28 10:06:51.000000000 -0400
+++ libselinux-2.0.78/utils/matchpathcon.c	2009-03-04 15:23:52.000000000 -0500
@@ -101,6 +101,11 @@
 	for (i = optind; i < argc; i++) {
 		int mode = 0;
 		struct stat buf;
+		int len = strlen(argv[i]);
+		if (len > 1  && argv[i][len - 1 ] == '/') {
+			argv[i][len - 1 ] = '\0';
+		}
+
 		if (lstat(argv[i], &buf) == 0)
 			mode = buf.st_mode;
 

[-- Attachment #3: libselinux-matchpathcon.patch.sig --]
[-- Type: application/pgp-signature, Size: 72 bytes --]

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

end of thread, other threads:[~2009-05-18 15:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-04 20:39 Patch matchpathcon to eliminate file "/" Daniel J Walsh
2009-04-16 21:39 ` Chad Sellers
2009-05-18 15:27   ` 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.