policycoreutils: setfiles: do not syslog if no changes
Basically this change stops sysloging if the change did not actually happen. By default we do not modify a label if the type of the SELinug context was unchanged, but we were sending a syslog message as if something had changed. Signed-off-by: Eric Paris <eparis@redhat.com> Acked-by: Dan Walsh <dwalsh@redhat.com>
This commit is contained in:
parent
69d418551e
commit
687ff489e6
1 changed files with 1 additions and 1 deletions
|
@ -221,7 +221,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);
|
||||
|
|
Loading…
Reference in a new issue