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: Eric Paris <eparis@parisplace.org>,
	Eric Paris <eparis@redhat.com>, SELinux <selinux@tycho.nsa.gov>
Subject: Re: Boolean change of names.
Date: Mon, 11 Jun 2012 13:49:28 -0400	[thread overview]
Message-ID: <4FD62FA8.7070802@redhat.com> (raw)
In-Reply-To: <1339436091.8102.32.camel@moss-pluto.epoch.ncsc.mil>

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

On 06/11/2012 01:34 PM, Stephen Smalley wrote:
> On Mon, 2012-06-11 at 13:21 -0400, Eric Paris wrote:
>> On Mon, Jun 11, 2012 at 12:51 PM, Stephen Smalley <sds@tycho.nsa.gov>
>> wrote:
>>> On Mon, 2012-06-11 at 12:12 -0400, Daniel J Walsh wrote:
>>>> We have started pushing a boolean change into Fedora 18.
>>>> 
>>>> https://fedoraproject.org/wiki/Features/SELinuxBooleansRename
>>>> 
>>>> The problem we are seeing is that boolean names used within an
>>>> interface are causing the install to fail on rebuild of policy.
>>>> 
>>>> IE If I installed a custom policy with a boolean used in it, and the
>>>> boolean changed then the module will blow up the policy compile.
>>>> 
>>>> 
>>>> interface(`kerberos_manage_host_rcache',` gen_require(` type
>>>> krb5_host_rcache_t; ')
>>>> 
>>>> ...
>>>> 
>>>> tunable_policy(`allow_kerberos',` allow $1 self:process setfscreate; 
>>>> ... ')
>>>> 
>>>> ... ')
>>>> 
>>>> And change the allow_kerberos to kerberos_enabled.
>>>> 
>>>> One idea would be to pull the translations into the semanage, or
>>>> would I need to do this at a lower level.  Or are we stuck with these
>>>> bad names forever...
>>> 
>>> Adding boolean aliases to the policy language, including kernel
>>> support, seems like the best route if you truly want to do this.
>> 
>> What does 'including kernel support' mean?  Expose both names in the 
>> booleans/ directory?
> 
> Yes, you would need to do that if you want [gs]etsebool or semanage boolean
> to support use of either name.
> 
> I guess if you only want this support for policy modules, you could do it
> entirely within libsepol and have it remap all aliases to their primary
> names during policy link/expand.
> 
> 
Adding a
boolalias newbool alias oldbool;

Is fine with me, although I still think we would need to generate a
translation table for libselinux.

getsebool allow_ypbind
nis_enabled --> off


And the kernel does not see the aliases.



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk/WL6gACgkQrlYvE4MpobM7DQCglWRmFTs5UAsO2RiJMiDc5F+0
BK0AoOrmGk7uS3MJD9Vxu5/CkO3LHHSr
=HgF6
-----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.

  parent reply	other threads:[~2012-06-11 17:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-11 16:12 Boolean change of names Daniel J Walsh
2012-06-11 16:51 ` Stephen Smalley
2012-06-11 17:21   ` Eric Paris
2012-06-11 17:34     ` Stephen Smalley
2012-06-11 17:38       ` Daniel J Walsh
2012-06-11 17:45         ` Stephen Smalley
2012-06-11 17:49           ` Eric Paris
2012-06-11 17:49       ` Daniel J Walsh [this message]
2012-06-11 17:49       ` Christopher J. PeBenito
2012-06-11 17:36   ` 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=4FD62FA8.7070802@redhat.com \
    --to=dwalsh@redhat.com \
    --cc=eparis@parisplace.org \
    --cc=eparis@redhat.com \
    --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.