From: Daniel J Walsh <dwalsh@redhat.com>
To: russell@coker.com.au
Cc: zia.syed@smartweb.rgu.ac.uk, selinux@tycho.nsa.gov
Subject: Re: fedora core 3, httpd and PHP exec()
Date: Mon, 27 Dec 2004 07:55:21 -0500 [thread overview]
Message-ID: <41D00639.10102@redhat.com> (raw)
In-Reply-To: <200412251702.17953.russell@coker.com.au>
Russell Coker wrote:
>On Saturday 25 December 2004 15:38, Zia Syed <zia.chacho@gmail.com> wrote:
>
>
>>I'm running PHP in safe mode, and trying to run system command (uptime)
>>in exec() statement. When i turn off the selinux (via firewall settings
>>in KDE), the script works fine, but when its enabled, i get the
>>following error in /var/log/messages
>>
>>Dec 25 04:15:26 melville kernel: audit(1103948126.072:0): avc: denied
>>{ read }
>> for pid=5926 exe=/usr/sbin/httpd name=sh dev=hda2 ino=670441
>>scontext=root:sys
>>tem_r:httpd_t tcontext=system_u:object_r:bin_t tclass=lnk_file
>>Dec 25 04:17:46 melville kernel: audit(1103948266.882:0): avc: denied
>>{ read }
>> for pid=5944 exe=/usr/sbin/httpd name=sh dev=hda2 ino=670441
>>scontext=root:sys
>>tem_r:httpd_t tcontext=system_u:object_r:bin_t tclass=lnk_file
>>
>>
>
>We should allow it to read such sym-links.
>
>Probably the best thing to do for executing programs via system(3) (as it
>seems PHP is doing) is to have a domain_auto_trans() rule.
>
>Maybe domain_auto_trans(httpd_t, shell_exec_t, httpd_sys_script_t)?
>
>
>
Reading the policy, it looks like if you set the boolean httpd_ssi_exec
you get this rule.
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
prev parent reply other threads:[~2004-12-27 12:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-25 4:38 fedora core 3, httpd and PHP exec() Zia Syed
2004-12-25 6:02 ` Russell Coker
[not found] ` <41CD5AAB.80505@smartweb.rgu.ac.uk>
2004-12-25 16:47 ` Russell Coker
2004-12-27 12:55 ` Daniel J Walsh [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41D00639.10102@redhat.com \
--to=dwalsh@redhat.com \
--cc=russell@coker.com.au \
--cc=selinux@tycho.nsa.gov \
--cc=zia.syed@smartweb.rgu.ac.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.