Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: simplified question: msg#00097

Subject: Re: simplified question
On Mon, 2005-11-14 at 18:06 +0000, Paul Howarth wrote:
> Craig White wrote:
> > I have selinux-targeted-policy-sources installed.
> > 
> > I am trying to make entries that fix these two errors
> > in //etc/selinux/targeted/src/policy/domains/local.te
> > 
> > #1
> > 
> > Nov 14 10:43:14 srv1 dbus: Can't send to audit system: USER_AVC pid=3024
> > uid=81 loginuid=-1 message=avc:  denied  { send_msg } for
> > scontext=user_u:system_r:unconfined_t tcontext=user_u:system_r:initrc_t
> > tclass=dbus
> 
> allow unconfined_t initrc_t:dbus send_msg;
> 
> > #2
> > 
> > Nov 14 10:43:14 srv1 kernel: audit(1131990194.347:11): avc:  denied
> > { connectto } for  pid=2941 comm="httpd" name="mysql.sock"
> > scontext=user_u:system_r:httpd_t tcontext=user_u:system_r:initrc_t
> > tclass=unix_stream_socket
> 
> allow httpd_t initrc_t:unix_stream_socket connectto;
> 
> > Can anyone tell me what might work here? This doesn't work...
> > 
> > # cat /etc/selinux/targeted/src/policy/domains/local.te
> > ## http to mysql
> > allow httpd_t var_t:sock_file write;
> > allow httpd_t unconfined_t:unix_stream_socket connectto;
> 
> See audit2allow(1) for a tool to generate rules from AVC messages.
> 
> However, I think the problem might be better resolved by other means. 
> The second of these issues appears to be related to your mysql.sock 
> having context user_u:system_r:initrc_t; on my FC4 box, 
> /var/lib/mysql/mysql.sock has context 
> system_u:object_r:mysqld_var_run_t. You might want to look into why that 
> is first.
----
Thanks Paul,

well - this was from CentOS 4.2 so that may account for a difference. I
tried asking on CentOS list several times and all that seems to do is
spark a debate between those that simply shut off SELinux and those like
me who want to learn to live with it...of course the questions never get
answered.

audit2allow doesn't show anything concerning the dbus error. That still
is present. The above did fix the problem with connecting between httpd
-> mysql.sock so that is cool. The dbus error has been around for a
while and it doesn't seem to prevent anything that I need but would like
the education of it - so it remains.

audit2allow doesn't have a man page so I haven't garnered much of
anything that isn't in audit2allow --help. 

I'll keep looking but I appreciate the help and I have learned much
today already (selinux-targeted-policy-sources was a good one)

grep -r mysql /etc/selinux |grep run 

turns up (among other things)...
/etc/selinux/targeted/contexts/files/file_contexts:/var/lib/mysql/mysql
\.sock -s        system_u:object_r:mysqld_var_run_t

Craig


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qnx.openqnx.dev...    gcc.libstdc++.c...    solaris.opensol...    information-ret...    misc.misterhous...    web.catalyst.ge...    apache.webservi...    redhat.release....    hardware.lirc/2...    kernel.autofs/2...    technology.sust...    linux.vdr/2003-...    editors.lyx.gen...    org.user-groups...    netbsd.devel.pk...    xdg.devel/2004-...    version-control...    jakarta.slide.d...    debian.packages...    creativecommons...    ports.ppc.embed...    bug-tracking.bu...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe