All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chad Sellers <csellers@tresys.com>
To: Caleb Case <ccase@tresys.com>, <selinux@tycho.nsa.gov>
Cc: <kmacmillan@tresys.com>, <jwcart2@tycho.nsa.gov>,
	<jbrindle@tresys.com>, Stephen Smalley <sds@tycho.nsa.gov>
Subject: Re: [PATCH 00/13] RFC libsemanage move to var, enable/disable module, and priority support
Date: Thu, 07 Jan 2010 17:28:06 -0500	[thread overview]
Message-ID: <C76BCA26.B1E12%csellers@tresys.com> (raw)
In-Reply-To: <1261610760-4724-1-git-send-email-ccase@tresys.com>

On 12/23/09 6:25 PM, "Caleb Case" <ccase@tresys.com> wrote:

> Our motivations for this patchset are to:
> 
> * Move the semanage store - the portion of the SELinux configuration
>   managed by libsemanage - to a more appropriate location in the
>   filesystem. The current location - in /etc - is designated for
>   administrator controlled configuration and is sometimes mounted
>   read-only. By storing binary, program managed data in /etc libsemanage
>   breaks administrator expectations.
> 
> * Enable the overriding of modules in the module store without require
>   the original modules to removed or modified. This allows
>   administrators to customize the policy more fully while allowing the
>   distribution provided policies to be left unmodified and continue to
>   be updated by the package manager.
> 
> * Provide the ability for an administrator to disable a module without
>   removing or overriding that module.
> 
> [Move to /var/lib/selinux]
> 
> Move the libsemanage private store
> from /etc/selinux/<policy type>/modules
> to   /var/lib/selinux/<policy type>
> 
> The benefits of this are:
> 
> * Permits the use of a read-only /etc.
> 
> * Conforms to the Filesystem Hierarchy Standard.
> 
> An additional change in layout structure moves the temporary space for
> the active policy to an external temporary space. This has the benefit
> of permitting source control management to be used on the private
> policy.
> 
> [Module Priorities]
> 
> Module priorities modify libsemanage and the module store to allow
> multiple modules with the same name to exist with different priorities.
> Only the highest priority module is used to create the final system
> policy. The addition of module priorities enables the modification of
> the system policy without modifying individual modules. For example, it
> allows an administrator to add his own policy module for apache,
> completely replacing the distribution provided module, without changing
> or removing the distribution policy. This has several benefits:
> 
> * Distribution provided policy package updates proceed normally - the
>   distribution policy is inserted but the administrator provided policy
>   remains active.
> 
> * Multiple levels allows distributors, 3rd party applications, system
>   management tools (e.g., puppet), and local administrators to all make
>   changes without conflicting.
> 
> * Semanage modifications of policy (e.g., port labeling) will be able to
>   use high priority modules in the future to override defaults (requires
>   the CIL[1] language changes).
> 
> [Enable/Disable Modules]
> 
> Modules gain an enabled / disabled status. Enabled modules are used by
> semanage when building the active policy, and disabled modules are
> ignored. The main benefit of this is that modules can be disabled
> without out removing them from the store.
> 
> [Patchset Breakdown]
> 
> The patchset is broken down as follows:
> 
> Bug fixes:
> 
> libsemanage: fix type in tests makefile -o -> -O
> 
> Move the libsemanage store to /var/lib/selinux:
> 
> semanage: move permissive module creation to /tmp
> libsemanage: move the module store to /var/lib/selinux
> libsemanage: split final files into /var/lib/selinux/tmp
> libsemanage: update unit tests for move to /var/lib/selinux
> 
> Implement support for the new libsemanage store layout:
> 
> libsemanage: add default priority to semanage_handle_t
> libsemanage: augment semanage_module_info_t and provide semanage_module_key_t
> libsemanage: get/set module info and enabled status
> libsemanage: provide function to get new base module path
> libsemanage: provide function to get new base module path
> libsemanage: installing/upgrading/removing modules via info and key
> 
> Provide private headers for upstream tools to use:
> 
> libsemanage: new private api for unstable functions
> 
> Extend semodule to support enable/disable, priorities, and detailed listings:
> 
> semodule: add priority, enabled, and extended listing
> 
> Migration script for moving the libsemanage store:
> 
> semanage store migration script
> 
> Thanks for you feedback!
> 
> Caleb
> 
> [1] CIL RFC: http://marc.info/?l=selinux&m=124759244409438&w=2
> 
> Caleb Case (13):
>   libsemanage: fix typo in tests makefile -o -> -O
>   semanage: move permissive module creation to /tmp
>   libsemanage: move the module store to /var/lib/selinux
>   libsemanage: split final files into /var/lib/selinux/tmp
>   libsemanage: update unit tests for move to /var/lib/selinux
>   libsemanage: add default priority to semanage_handle_t
>   libsemanage: augment semanage_module_info_t and provide
>     semanage_module_key_t
>   libsemanage: get/set module info and enabled status
>   libsemanage: provide function to get new base module path
>   libsemanage: installing/upgrading/removing modules via info and key
>   libsemanage: new private api for unstable functions
>   semodule: add priority, enabled, and extended listing
>   semanage store migration script
> 
>  libsemanage/include/Makefile                     |    3 +
>  libsemanage/include/semanage/private/handle.h    |   31 +
>  libsemanage/include/semanage/private/modules.h   |  281 ++++
>  libsemanage/include/semanage/private/semanage.h  |   26 +
>  libsemanage/src/boolean_internal.h               |    4 +-
>  libsemanage/src/booleans_file.c                  |    7 +-
>  libsemanage/src/booleans_policydb.c              |    6 +-
>  libsemanage/src/database_file.c                  |   45 +-
>  libsemanage/src/database_file.h                  |    3 +-
>  libsemanage/src/database_policydb.c              |   37 +-
>  libsemanage/src/database_policydb.h              |    3 +-
>  libsemanage/src/direct_api.c                     | 1652
> +++++++++++++++++++---
>  libsemanage/src/fcontext_internal.h              |    3 +-
>  libsemanage/src/fcontexts_file.c                 |    7 +-
>  libsemanage/src/genhomedircon.c                  |    3 +-
>  libsemanage/src/handle.c                         |   23 +
>  libsemanage/src/handle.h                         |    3 +
>  libsemanage/src/handle_internal.h                |    1 +
>  libsemanage/src/iface_internal.h                 |    4 +-
>  libsemanage/src/interfaces_file.c                |    7 +-
>  libsemanage/src/interfaces_policydb.c            |    6 +-
>  libsemanage/src/libsemanage.map                  |   26 +
>  libsemanage/src/module_internal.h                |   21 +
>  libsemanage/src/modules.c                        |  999 +++++++++++++-
>  libsemanage/src/modules.h                        |   76 +-
>  libsemanage/src/node_internal.h                  |    4 +-
>  libsemanage/src/nodes_file.c                     |    7 +-
>  libsemanage/src/nodes_policydb.c                 |    6 +-
>  libsemanage/src/policy.h                         |   36 +
>  libsemanage/src/port_internal.h                  |    4 +-
>  libsemanage/src/ports_file.c                     |    7 +-
>  libsemanage/src/ports_policydb.c                 |    6 +-
>  libsemanage/src/semanage_store.c                 |  794 ++++++++---
>  libsemanage/src/semanage_store.h                 |   47 +-
>  libsemanage/src/seuser_internal.h                |    4 +-
>  libsemanage/src/seusers_file.c                   |    7 +-
>  libsemanage/src/user_internal.h                  |    6 +-
>  libsemanage/src/users_base_file.c                |    7 +-
>  libsemanage/src/users_base_policydb.c            |    6 +-
>  libsemanage/src/users_extra_file.c               |    7 +-
>  libsemanage/tests/Makefile                       |    2 +-
>  libsemanage/tests/test_semanage_store.c          |   34 +-
>  libsemanage/utils/semanage_migrate_etc_to_var.py |  301 ++++
>  policycoreutils/semanage/seobject.py             |   15 +-
>  policycoreutils/semodule/semodule.8              |   25 +-
>  policycoreutils/semodule/semodule.c              |  242 +++-
>  46 files changed, 4267 insertions(+), 577 deletions(-)
>  create mode 100644 libsemanage/include/semanage/private/handle.h
>  create mode 100644 libsemanage/include/semanage/private/modules.h
>  create mode 100644 libsemanage/include/semanage/private/semanage.h
>  create mode 100755 libsemanage/utils/semanage_migrate_etc_to_var.py
> 
Well, there have been no comments on this patchset. I'm guessing that's
because:

1) We've talked to some of you face to face about it already.
2) It's a big patchset, and you'd want to try it out a bit before
commenting.

To address #2, I'd like to propose creating an upstream branch for these
changes. This patchset is actually just the first patchset in a larger
effort to improve policy infrastructure. I think an upstream branch will
make it easier for many people to track those changes and try out the new
features we're creating. Eventually that branch can be merged back into
master.

Thoughts?

Thanks,
Chad Sellers
 
Oh, and in case it wasn't implied:
Acked-by: Chad Sellers <csellers@tresys.com>


--
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:[~2010-01-07 22:28 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-23 23:25 [PATCH 00/13] RFC libsemanage move to var, enable/disable module, and priority support Caleb Case
2009-12-23 23:25 ` [PATCH 01/13] libsemanage: fix typo in tests makefile -o -> -O Caleb Case
2009-12-23 23:25   ` [PATCH 02/13] semanage: move permissive module creation to /tmp Caleb Case
2009-12-23 23:25     ` [PATCH 03/13] libsemanage: move the module store to /var/lib/selinux Caleb Case
2009-12-23 23:25       ` [PATCH 04/13] libsemanage: split final files into /var/lib/selinux/tmp Caleb Case
2009-12-23 23:25         ` [PATCH 05/13] libsemanage: update unit tests for move to /var/lib/selinux Caleb Case
2009-12-23 23:25           ` [PATCH 06/13] libsemanage: add default priority to semanage_handle_t Caleb Case
2009-12-23 23:25             ` [PATCH 07/13] libsemanage: augment semanage_module_info_t and provide semanage_module_key_t Caleb Case
2009-12-23 23:25               ` [PATCH 08/13] libsemanage: get/set module info and enabled status Caleb Case
2009-12-23 23:25                 ` [PATCH 09/13] libsemanage: provide function to get new base module path Caleb Case
2009-12-23 23:25                   ` [PATCH 10/13] libsemanage: installing/upgrading/removing modules via info and key Caleb Case
2009-12-23 23:25                     ` [PATCH 11/13] libsemanage: new private api for unstable functions Caleb Case
2009-12-23 23:25                       ` [PATCH 12/13] semodule: add priority, enabled, and extended listing Caleb Case
2009-12-23 23:26                         ` [PATCH 13/13] semanage store migration script Caleb Case
2010-01-08 15:34                           ` Stephen Smalley
2010-01-08 20:59                             ` James Carter
2010-01-08 21:05                               ` Stephen Smalley
2010-01-08 21:27                               ` Caleb Case
2010-01-11 19:53                                 ` James Carter
2010-01-11 19:57                                   ` Joshua Brindle
2010-01-11 20:45                                     ` James Carter
2010-01-08 14:30         ` [PATCH 04/13] libsemanage: split final files into /var/lib/selinux/tmp Stephen Smalley
2010-01-08 15:07           ` James Carter
2010-01-08 15:28             ` Stephen Smalley
2010-01-08 18:25               ` Caleb Case
2010-01-08 20:19               ` Joshua Brindle
2010-01-08 20:25                 ` Stephen Smalley
2010-01-08 20:30                   ` Joshua Brindle
2010-01-08 20:51                     ` Joshua Brindle
2010-01-08 20:58                       ` Stephen Smalley
2010-01-08 21:02                         ` Joshua Brindle
2010-01-08 21:04                           ` Stephen Smalley
2010-01-08 21:12                           ` James Carter
2010-01-08 14:28       ` [PATCH 03/13] libsemanage: move the module store to /var/lib/selinux Stephen Smalley
2010-01-08 14:50         ` James Carter
2010-01-08 15:19           ` Stephen Smalley
2010-01-07 22:28 ` Chad Sellers [this message]
2010-01-08 14:30   ` [PATCH 00/13] RFC libsemanage move to var, enable/disable module, and priority support James Carter
2010-01-21 21:06     ` Chad Sellers

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=C76BCA26.B1E12%csellers@tresys.com \
    --to=csellers@tresys.com \
    --cc=ccase@tresys.com \
    --cc=jbrindle@tresys.com \
    --cc=jwcart2@tycho.nsa.gov \
    --cc=kmacmillan@tresys.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.