On 09/20/17 18:13, Frédéric Bron wrote:
> How the output of this?
>
> restorecon -F -v /etc/passwd
Relabeled /etc/passwd from unconfined_u:object_r:passwd_file_t:s0 to
system_u:object_r:passwd_file_t:s0
So the force option was necessary?
Yes.... But I don't think unconfined_u:object_r:passwd_file_t:s0 would have caused
any issues.
I did the following test....
[root@f26-rc15k etc]# ls -Z passwd
system_u:object_r:passwd_file_t:s0 passwd
[root@f26-rc15k etc]# mv passwd passwd.orig
[root@f26-rc15k etc]# cp passwd.orig passwd
[root@f26-rc15k etc]# ls -Z passwd
unconfined_u:object_r:passwd_file_t:s0 passwd
[root@f26-rc15k etc]# matchpathcon -V passwd
passwd verified.
[root@f26-rc15k etc]# restorecon -F -v passwd
Relabeled /etc/passwd from unconfined_u:object_r:passwd_file_t:s0 to
system_u:object_r:passwd_file_t:s0
[root@f26-rc15k etc]# matchpathcon -V passwd
passwd verified.
So, you can see that in both cases matchpathcon verified the context.
--
Fedora Users List - The place to go to speculate endlessly