All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel J Walsh <dwalsh@redhat.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: SELinux <selinux@tycho.nsa.gov>, Eric Paris <eparis@parisplace.org>
Subject: Re: Setting labels on a disabled SELinux box.
Date: Tue, 20 Apr 2010 11:00:11 -0400	[thread overview]
Message-ID: <4BCDC17B.3090104@redhat.com> (raw)
In-Reply-To: <1271774732.30027.73.camel@moss-pluto.epoch.ncsc.mil>

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

On 04/20/2010 10:45 AM, Stephen Smalley wrote:
> On Tue, 2010-04-20 at 10:21 -0400, Daniel J Walsh wrote:
>> Currently the kernel is blocking the setting of labels on a disabled
>> SELinux box.
>>
>> We have made changes to livecd to be able to build a livecd image on a
>> disabled SELinux box, but the kernel is preventing the placing of labels.
>>
>> We want this functionality so that Fedora Build machines can be allowed
>> to create different kinds of images and do not want to require all
>> machines to enable SELinux.
>>
>> Currently these images are being built with SELinux disabled because of
>> this.
>>
>> strace shows
>>
>> lsetxattr("/root/whatever/", "security.selinux",
>> "system_u:object_r:root_t:s0", 28, 0) = -1 EOPNOTSUPP (Operation not
>> supported)
>>
>>
>> eparis says this code is causing the problem.
>>
>>  static int cap_inode_setsecurity(struct inode *inode, const char *name,
>>                                   const void *value, size_t size, int flags)
>>  {
>>          return -EOPNOTSUPP;
>>  }
>>
>> I think we should allow this if you have a capability like sys_admin or
>> dac_override.
> 
> Perhaps I don't understand, but inode_setsecurity() is only called if
> the filesystem does not support xattrs; otherwise it gets handled via
> the filesytem's ->setxattr handler, and that should work regardless of
> SELinux-disabled (and always has in the past).
> 
> I think we need more details, like kernel version, filesystem type, etc.
> 

2.6.32.11-99.fc12.x86_64; ext4
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkvNwXsACgkQrlYvE4MpobPKMQCgpuvQ4a3fmPWRqs27VFQzR5rT
G44An1MkWEUAOIshAvbmvaqQqzG3Oiql
=tQVy
-----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-20 15:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-20 14:21 Setting labels on a disabled SELinux box Daniel J Walsh
2010-04-20 14:45 ` Stephen Smalley
2010-04-20 15:00   ` Daniel J Walsh [this message]
2010-04-20 15:05     ` Eric Paris
2010-04-20 15:12       ` Stephen Smalley
2010-04-20 16:00         ` Daniel J Walsh

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=4BCDC17B.3090104@redhat.com \
    --to=dwalsh@redhat.com \
    --cc=eparis@parisplace.org \
    --cc=sds@tycho.nsa.gov \
    --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.