I am trying to export a Samba share and changing its SELinux fcontext to 'samba_share_t'. However in the guide that I follow after changing the fcontext, I need to run 'restorecon' over the exported samba directory. Looking at the manpage for it => "restore file(s) default SELinux security contexts", I am just wondering is not that going to revert back the directory to a state where fcontext does not have the 'samba_share_t' value?
According to Red Hat documentation (Persistent Changes: semanage fcontext), if you want these to persist you'd use
semanage, then a
restorecon will use what you want instead of the policy's context.