Skip to contentSkip to conversation

matchpathcon -V does not always work as expected.

PATCH Daniel J Walsh 2 participants 2 messages Sep 30, 2008 – Oct 14, 2008 SELinux security module

lore
Share & tools
lore
#0 lore raw

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

matchpathcon -V should be passing the mode when checking whether the file context on a file is correct.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkjiIXoACgkQrlYvE4MpobPXJwCeOgcA2Zj05Mwdmqv0NGxyl3RZ lr8AmwYglOU6ubFXO0r9jh1Z2v6cAO9u
=wk/a
-----END PGP SIGNATURE-----

utils/matchpathcon.c +2 -2
diff --exclude-from=exclude -N -u -r nsalibselinux/utils/matchpathcon.c libselinux-2.0.71/utils/matchpathcon.c
@@ -106,12 +106,12 @@
 
 		if (verify) {
 			if (quiet) {
-				if (selinux_file_context_verify(argv[i], 0))
+				if (selinux_file_context_verify(argv[i], mode))
 					continue;
 				else
 					exit(1);
 			}
-			if (selinux_file_context_verify(argv[i], 0)) {
+			if (selinux_file_context_verify(argv[i], mode)) {
 				printf("%s verified.\n", argv[i]);
 			} else {
 				security_context_t con;
#1 lore raw
Quoted 9 lines · Daniel J Walsh

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

matchpathcon -V should be passing the mode when checking whether the file context on a file is correct.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

Quoted 5 lines

iEYEARECAAYFAkjiIXoACgkQrlYvE4MpobPXJwCeOgcA2Zj05Mwdmqv0NGxyl3RZ lr8AmwYglOU6ubFXO0r9jh1Z2v6cAO9u
=wk/a
-----END PGP SIGNATURE-----

merged in libselinux-2.0.74

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.