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: httpd controls ?: msg#00209

Subject: Re: httpd controls ?
On Wed, 2005-03-30 at 10:03 -0600, Christofer C. Bell wrote:

> That's a very good point and really bears spelling out.  How would one
> go about creating the new domain and then implementing the proper
> transition for just one set of CGI scripts?  I ask because I (was)
> running Open WebMail and ran into the case where I needed to
> effectively disable SELinux controls over all CGI scripts to allow OWM
> to run.  I would have preferred the case where these controls were
> removed *only* for the relavent scripts, allowing the remaining
> scripts to keep the protections afforded by the default policy.

Dan has written a new domain "httpd_unconfined_t" and corresponding
httpd_unconfined_script_exec_t which I believe is in the latest rawhide.
You can then mark specific CGI scripts such as ones that change user
passwords like so:

chcon -t httpd_unconfined_script_exec_t /path/to/my/passwd.cgi

Then the script will be unconfined when executed by httpd.  Note that in
general this is fairly dangerous if the script is actually written in a
language like Python, since a malicious httpd_t process could set a
number of environment variables like PYTHONPATH before executing the
script which could easily lead to a compromise of the unconfined script.
I can't think of a good solution for this other than writing your own
little C program.  Probably we need a specialized interpreter,
e.g. /bin/envexec which would take a list of environment variables to
preserve, and you could write a little script like:

#!/bin/envexec 
/var/www/cgi-bin/myscript.cgi

Then you make that file executable and make its type be
httpd_unconfined_script_exec_t.  

Maybe someone can think of a better way to create wrappers for cleaning
the environment without actually writing a new little C program.




<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