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: SELinux settings for a program run either by apache or user?: msg#00175

Subject: Re: SELinux settings for a program run either by apache or user?
On Thu, 2005-01-20 at 11:21 -0500, Stephen Smalley wrote:
> On Thu, 2005-01-20 at 11:19, Colin Walters wrote:
> > Right; but studying the policy a bit more, there are definitely
> > permissions given to CGI scripts not given to ordinary userdomains,
> > e.g.:
> > 
> > ############################################
> > # Allow scripts to append to http logs
> > #########################################
> > allow httpd_$1_script_t httpd_log_t:file { getattr append };
> 
> Append-only access should be relatively benign, although I'm not sure
> whether it is justified here.  But if it allowed to httpd_user_script_t,
> then user_t effectively has those permissions anyway, as he can always
> create a CGI script with arbitrary code and then access the URL to
> invoke it from httpd, whether or not he can directly transition to the
> domain or not.

Agreed; I was bringing this up primarily to point out that simply
removing the automatic transition would introduce other issues.  I have
a feeling that there's another issue having to do with preserving file
contexts, but I can't put my finger on it.

> > So that's something to consider.  Perhaps what we really want is a
> > domain derived from httpd_$1_script_t, e.g. httpd_$1_test_script_t,
> > which is allowed to write to the terminal as well.  That would be fairly
> > complex though...
> 
> Could certainly be done via shared macros for these testing domains and
> the normal script domain.  But not clear it is worth it...

Yeah.  It might be nice if the policy language had an easy "subclass"
mechanism.  That's a whole other topic though...

For now anyways, we could probably just change it to a domain_trans; a
quick look at the policy seems to show the httpd_log_t access being the
only obvious additional permission granted.  Presumably a majority of
setups with CGI scripts and users are using suEXEC and do not allow
ordinary uids any kind of write access to the main httpd logs.




<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