2008/2/4, Stephen Smalley <<a href="mailto:sds@tycho.nsa.gov">sds@tycho.nsa.gov</a>>:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>On Sat, 2008-02-02 at 17:02 +0900, Shintaro Fujiwara wrote:<br>> Hi, I read man semanage and found that semanage fcontext -a uses<br>> restorecon.<br>><br>> Does that mean I don't have to restorecon after I semanage fcontext<br>
> -a ?<br><br>semanage fcontext -a adds entries to the local file contexts<br>configuration.  It doesn't directly relabel any files.  Then, after<br>you've run semanage fcontext -a to add the entry, you can run restorecon<br>
or other relabeling programs to actually relabel the files to the<br>context you've specified in the entry.</blockquote><div><br>OK, I understand.<br>So, I have to relabel by restorecon after I semanage fcontext -a path, right ?<br>
</div><br>I already re-written my program (segatex) to restorecon after semanage fcontext -a -m.<br><br>Thank you very much.<br><br><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
> I just did restorecon fcontext -a and relabeled the system and found<br>> that file context survived.<br><br>Yes, the relabeling programs (setfiles, restorecon, fixfiles) all<br>consult the file contexts configuration, and semanage fcontext -a is how<br>
you add local entries to that configuration.  The other way to add<br>entries is by inserting a loadable policy module with its own .fc file.<br><br>--<br>Stephen Smalley<br>National Security Agency<br><br></blockquote></div>
<br><br clear="all"><br>-- <br><a href="http://intrajp.no-ip.com/">http://intrajp.no-ip.com/</a> Home Page