Al Pacifico wrote:
On 4/23/07, *Daniel J Walsh* <dwalsh(a)redhat.com
Al Pacifico wrote:
> This is related to the daemon question I asked earlier.
> I created a problem using policygentool by specifying that a log
> is written to by two different binaries with different policies. My
> thread about "Helper program for a daemon" provides some context (no
> pun intended).
> I didn't realize that installing the policy would change the file
> context specification database (although it makes perfect sense in
> retrospect). Now, I've inadvertently specified that
> /var/log/slimserver be labelled under two different contexts in
> /etc/selinux/targeted/contexts/files/file_contexts and wish to
> the second set of entries.
> Output of setfiles -n
> /etc/selinux/targeted/contexts/files/file_contexts $filename
> several messages of the form:
> /etc/selinux/targeted/contexts/files/file_contexts: Multiple
> specifications for /var/log/slimserver
> (system_u:object_r:slimserver_scanner_var_log_t and
> My policy module didn't install correctly because of this error,
> the file contexts specification is now incorrect. What is the
> to correct this?
> 1. Just use sed or vi to eliminate the second specification?
> 2.Remove both installed policies that I wrote (which are the only
> non-stock policy modules installed on my FC5 box) using semodule and
> restore /etc/selinux/targeted/contexts/files/file_contexts from the
> rpm package file?
> Keep in mind I'm doing this over ssh to a box with no GUI, so I
> use the command line, vi, etc.
semanage fcontext -d /var/log/slimserver
If I reboot, does the file
/etc/selinux/targeted/contexts/files/file_contexts get automatically
rewritten? If so, where does the information that it's filled with
come from and what process rewrites it?
No, Only time these files get modified is by the semanage or semodule
command. (rpm installations, often execute these commands. ) All the
data used to build this file is in /etc/selinux/targeted/modules/active/
> Al Pacifico
> Seattle, WA
> fedora-selinux-list mailing list