libselinux/selinux_restorecon: Skip customized files also without -v

In the original code, customizable file contexts were not changed only if -v was
used. It lead to different behavior when selinux_restorecon was run with -v and
without it.

Based on an initial patch by Jan Zarsky <jzarsky@redhat.com>

Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
This commit is contained in:
Petr Lautrbach 2019-02-06 20:41:11 +01:00 committed by Nicolas Iooss
parent 4634e8fe39
commit 347719d15f
No known key found for this signature in database
GPG Key ID: C191415F340DAAA0

View File

@ -672,8 +672,8 @@ static int restorecon_sb(const char *pathname, const struct stat *sb,
selinux_log(SELINUX_INFO,
"%s not reset as customized by admin to %s\n",
pathname, curcon);
goto out;
}
goto out;
}
if (!flags->set_specctx && curcon) {