Question on semanage fcontext -a

Stephen Smalley sds at tycho.nsa.gov
Mon Feb 4 15:01:34 UTC 2008


On Mon, 2008-02-04 at 23:51 +0900, Shintaro Fujiwara wrote:
> 2008/2/4, Stephen Smalley <sds at tycho.nsa.gov>:
>         semanage fcontext -a adds entries to the local file contexts
>         configuration.  It doesn't directly relabel any files.  Then,
>         after
>         you've run semanage fcontext -a to add the entry, you can run
>         restorecon
>         or other relabeling programs to actually relabel the files to
>         the
>         context you've specified in the entry.
> 
> OK, I understand.
> So, I have to relabel by restorecon after I semanage fcontext -a path,
> right ?

Yes.  You don't have to do a full relabel, of course, just a restorecon
of the relevant directories and/or files.

> I already re-written my program (segatex) to restorecon after semanage
> fcontext -a -m.
> 
> Thank you very much.

-- 
Stephen Smalley
National Security Agency




More information about the fedora-selinux-list mailing list