[PATCH 14/90] policycoreutils: setfiles: If you are not changing any

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


   This patch looks good to me. acked.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk/I9xsACgkQrlYvE4MpobO/OACfeG50lLPHvaCw3BsxSOLZhE4v
Dy0AnR3Wb0qUPJVlO6Q2dAyje572MxGC
=V2pt
-----END PGP SIGNATURE-----
>From bb71b1cd9ebb112dec4feeaa5d475828a14e1ff2 Mon Sep 17 00:00:00 2001
From: Dan Walsh <dwalsh@xxxxxxxxxx>
Date: Mon, 30 Jan 2012 16:21:32 -0500
Subject: [PATCH 14/90] policycoreutils: setfiles: If you are not changing any
 labels do not send syslog messages FIXME MERGE?

Basically this change stops sysloging if the change did not actually
happen.

By default we do not modify a label if only the user component of the
SELinux context had changed, but were were sending a syslog messages
as if something had changed.

[can we merge?]

Signed-off-by: Eric Paris <eparis@xxxxxxxxxx>
Acked-by: Dan Walsh <dwalsh@xxxxxxxxxx>
---
 policycoreutils/setfiles/restore.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/policycoreutils/setfiles/restore.c b/policycoreutils/setfiles/restore.c
index e57d34f..5ade9f1 100644
--- a/policycoreutils/setfiles/restore.c
+++ b/policycoreutils/setfiles/restore.c
@@ -226,7 +226,7 @@ static int restore(FTSENT *ftsent)
 		       r_opts->progname, my_file, curcon ?: "", newcon);
 	}
 
-	if (r_opts->logging) {
+	if (r_opts->logging && r_opts->change) {
 		if (curcon)
 			syslog(LOG_INFO, "relabeling %s from %s to %s\n",
 			       my_file, curcon, newcon);
-- 
1.7.10.2


[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux