All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael K. Smith" <mksmith@adhost.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: <SELinux@tycho.nsa.gov>
Subject: Re: Fedora Core 5 Tomcat 4 problems
Date: Wed, 24 May 2006 10:06:42 -0700	[thread overview]
Message-ID: <C099E0B2.24D7E%mksmith@adhost.com> (raw)
In-Reply-To: <1148490176.24463.454.camel@moss-spartans.epoch.ncsc.mil>

Hello Stephen:


On 5/24/06 10:02 AM, "Stephen Smalley" <sds@tycho.nsa.gov> wrote:

> On Wed, 2006-05-24 at 09:20 -0700, Michael K. Smith wrote:
>> Hello All:
>> 
>> I am attempting to start Tomcat 4 using an rc script that uses the
>> unprivileged user "tomcat" to run the application.  The relevant line is:
>> 
>> su -l tomcat -p -s /bin/bash -c /usr/local/tomcat/bin/startup.sh
>> 
>> In addition, the tomcat user has /sbin/nologin in the password file.
>> 
>> Steps to make it work:
>> 
>> 1) Set SELinux to permissive and reboot
>> 2) Take resultant AVC messages and create local policy
>> 3) Load policy, set SELinux to enforcing and reboot
> 
> Rebooting shouldn't be strictly necessary in the above sequence.
> 

Sadly, it's necessary to confirm whether or not the rc script will fire at
boot.  If I run the script after the system has booted everything works just
fine.

<snip>
>> 
>> Below is a copy of the local.te file that was generated from the AVC
>> messages in /var/log/messages after setting to permissive.  The Tomcat
>> directory is /usr/local/tomcat and shows as:
>> 
>> drwxr-xr-x  tomcat   tomcat   user_u:object_r:usr_t
>> jakarta-tomcat-4.1.31
>> 
>> lrwxrwxrwx  root     root     user_u:object_r:usr_t            tomcat ->
>> /usr/local/jakarta-tomcat-4.1.31
> 
> This should really be in a different type than just usr_t.
> 
I set it to system_u:object_r:user_home_t to match the HTTP directory but
that didn't change the initial behavior.

<snip>
> 
> Can we see the full avc message for the execmod denial?

Absolutely.

May 27 08:03:57 bmedia kernel: audit(1117206233.280:4): avc:  denied  { read
} for  pid=1813 comm="su" name="tomcat" dev=sda6 ino=98262
scontext=system_u:system_r:initrc_su_t:s0 tcontext=user_u:object_r:usr_t:s0
tclass=lnk_file


Thanks again,

Mike


--
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.

  reply	other threads:[~2006-05-24 17:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-24 16:20 Fedora Core 5 Tomcat 4 problems Michael K. Smith
2006-05-24 17:02 ` Stephen Smalley
2006-05-24 17:06   ` Michael K. Smith [this message]
2006-05-24 17:15     ` Stephen Smalley
2006-05-25 13:16   ` Christopher J. PeBenito
2006-05-25 15:06     ` Michael Smith
2006-05-27 11:06     ` Russell Coker
2006-05-25  3:23 ` Russell Coker
2006-05-25 11:35   ` Stephen Smalley
2006-05-26  1:04     ` Russell Coker
     [not found] <1148495910.24463.513.camel@moss-spartans.epoch.ncsc.mil>
2006-05-24 21:34 ` Michael K. Smith
2006-05-25 11:34   ` Stephen Smalley

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=C099E0B2.24D7E%mksmith@adhost.com \
    --to=mksmith@adhost.com \
    --cc=SELinux@tycho.nsa.gov \
    --cc=sds@tycho.nsa.gov \
    /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.