<br><div><span class="gmail_quote">On 4/23/07, <b class="gmail_sendername">Daniel J Walsh</b> <<a href="mailto:dwalsh@redhat.com">dwalsh@redhat.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Al Pacifico wrote:<br>> This is related to the daemon question I asked earlier.<br>><br>> I created a problem using policygentool by specifying that a log file<br>> is written to by two different binaries with different policies. My
<br>> thread about "Helper program for a daemon" provides some context (no<br>> pun intended).<br>><br>> I didn't realize that installing the policy would change the file<br>> context specification database (although it makes perfect sense in
<br>> retrospect). Now, I've inadvertently specified that<br>> /var/log/slimserver be labelled under two different contexts in<br>> /etc/selinux/targeted/contexts/files/file_contexts and wish to remove<br>> the second set of entries.
<br>><br>> Output of setfiles -n<br>> /etc/selinux/targeted/contexts/files/file_contexts $filename includes<br>> several messages of the form:<br>><br>> /etc/selinux/targeted/contexts/files/file_contexts: Multiple different
<br>> specifications for /var/log/slimserver<br>> (system_u:object_r:slimserver_scanner_var_log_t and<br>> system_u:object_r:slimserver_var_log_t).<br>><br>> My policy module didn't install correctly because of this error, but
<br>> the file contexts specification is now incorrect. What is the best way<br>> to correct this?<br>> 1. Just use sed or vi to eliminate the second specification?<br>> 2.Remove both installed policies that I wrote (which are the only
<br>> non-stock policy modules installed on my FC5 box) using semodule and<br>> restore /etc/selinux/targeted/contexts/files/file_contexts from the<br>> rpm package file?<br>><br>> Keep in mind I'm doing this over ssh to a box with no GUI, so I must
<br>> use the command line, vi, etc.<br>semanage fcontext -d /var/log/slimserver</blockquote><div><br>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?
<br> </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">> -al<br>> --<br>> Al Pacifico<br>> Seattle, WA<br>> ------------------------------------------------------------------------
<br>><br>> --<br>> fedora-selinux-list mailing list<br>> <a href="mailto:fedora-selinux-list@redhat.com">fedora-selinux-list@redhat.com</a><br>> <a href="https://www.redhat.com/mailman/listinfo/fedora-selinux-list">
https://www.redhat.com/mailman/listinfo/fedora-selinux-list</a><br><br></blockquote></div><br><br clear="all"><br>-- <br>Al Pacifico<br>Seattle, WA