All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel J Walsh <dwalsh@redhat.com>
To: jimi@sngx.net
Cc: Selinux <selinux@tycho.nsa.gov>
Subject: Re: sudo + selinux
Date: Thu, 15 Apr 2010 16:08:17 -0400	[thread overview]
Message-ID: <4BC77231.7010108@redhat.com> (raw)
In-Reply-To: <43c51087c230c590d8eadc3b58fbbc07@sngx.net>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/14/2010 12:37 PM, James Cammarata wrote:
> 
> On Wed, 14 Apr 2010 11:16:56 -0500, James Cammarata <jimi@sngx.net> wrote:
>>>>
>>> Does this work in permissive mode?
>>
>> Actually, no, it doesn't, but I think I found the problem.  I was
> assuming
>> all I needed at the end of newrole was --, but the man page says to use
> "--
>> -c", which does seem to be working now.  Turning enforcing back on:
>>
>> [test@kvm001 ~]$ sudo /usr/bin/audit.sh echo "hi there"
>> Password:
>> hi there
>>
>> So, that seems to be good, but it's still asking for the password for the
>> selinux user.  Is pam_rootok not doing what it's supposed to?
The problem is rootok requires and SELinux priv to work also.  So this
will not work unless you add the rootok to your default userdomain.

allow staff_t self:passwd rootok;

> 
> Something else weird... I added a shebang line to the top of the audit.sh
> script, and now when I run it I don't get prompted for a password, but it
> fails with this message:
> 
> [test@kvm001 ~]$ sudo /usr/bin/audit.sh echo hi
> Could not determine enforcing mode.
> 
> Once again, there are no AVC's in the audit.log.  I did have to add this to
> my custom policy though:
> 
> allow staff_sudo_t newrole_exec_t:file { execute execute_no_trans };
> 
> 

Add an id -Z to the top of audit.sh
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkvHcjEACgkQrlYvE4MpobN31ACfYdQCBQmXVWjPINEa5q3Y1/Nc
l2gAoN29FupLNXfkgWZTwceeHKSWG2/1
=o+05
-----END PGP SIGNATURE-----

--
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:[~2010-04-15 20:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-12 19:30 sudo + selinux James Cammarata
2010-04-13 21:41 ` Chad Sellers
2010-04-12 19:56   ` James Cammarata
2010-04-14 12:35     ` Daniel J Walsh
2010-04-13 11:00       ` James Cammarata
2010-04-14 14:30         ` Daniel J Walsh
2010-04-13 13:53           ` James Cammarata
2010-04-14 16:11             ` Larry Ross
2010-04-14 16:30             ` Michal Svoboda
2010-04-14 16:49             ` Daniel J Walsh
2010-04-14 13:46               ` James Cammarata
2010-04-15 17:47                 ` Daniel J Walsh
2010-04-14 16:16                   ` James Cammarata
2010-04-14 16:37                     ` James Cammarata
2010-04-15 20:08                       ` Daniel J Walsh [this message]
2010-04-15 20:23                         ` 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=4BC77231.7010108@redhat.com \
    --to=dwalsh@redhat.com \
    --cc=jimi@sngx.net \
    --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.