All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael K. Smith" <mksmith@adhost.com>
To: <SELinux@tycho.nsa.gov>
Subject: Fedora Core 5 Tomcat 4 problems
Date: Wed, 24 May 2006 09:20:14 -0700	[thread overview]
Message-ID: <C099D5CE.24D51%mksmith@adhost.com> (raw)

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

If I leave SELinux in permissive the tomcat script works just fine and, if I
allow root to run tomcat that works as well.  I would like to have the
security of SELinux and an unprivileged user running Tomcat, so any help
would be greatly appreciated.

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

Thanks in advance,

Mike


module local 1.0;

require {
        class lnk_file read;
        class dir { getattr search };
        class security compute_av;
        class file { execmod getattr read };

        type initrc_su_t;
        type usr_t;
        type file_t;
        type hald_t;
        type initrc_su_t;
        type initrc_t;
        type locale_t;
        type mysqld_db_t;
        type pam_console_t;
        type security_t;
        type semanage_t;
        type user_home_t;
        type initrc_t;
        type locale_t;
 };

allow initrc_su_t usr_t:lnk_file read;
allow hald_t mysqld_db_t:dir getattr;
allow initrc_su_t security_t:security compute_av;
allow pam_console_t file_t:dir search;
allow initrc_t user_home_t:file execmod;
allow semanage_t locale_t:file { getattr read };


--
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 16:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-24 16:20 Michael K. Smith [this message]
2006-05-24 17:02 ` Fedora Core 5 Tomcat 4 problems Stephen Smalley
2006-05-24 17:06   ` Michael K. Smith
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=C099D5CE.24D51%mksmith@adhost.com \
    --to=mksmith@adhost.com \
    --cc=SELinux@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.