Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BREAKING: Redesign selinux::module defined type #195

Merged
merged 2 commits into from
Feb 17, 2017
Merged

BREAKING: Redesign selinux::module defined type #195

merged 2 commits into from
Feb 17, 2017

Conversation

vinzent
Copy link
Contributor

@vinzent vinzent commented Feb 8, 2017

Implements whats discussed in #178.

  • Adds ability to specify a builder (simple or refpolicy). Simple does not require the make utility.
  • Stops building in /usr - uses puppet agents vardir/puppet-selinux/

Extends and closes #189
Closes #178
Closes #146

@oranenj
Copy link
Contributor

oranenj commented Feb 8, 2017

seems fine to me. Does the single-dir-building still work idempotently and correctly remove the sources when puppet stops managing a resource?

@@ -44,11 +53,11 @@
validate_absolute_path($::selinux::config::module_build_dir)
validate_absolute_path($::selinux::refpolicy_makefile)

$module_dir = "${::selinux::config::module_build_dir}/${title}"
$module_dir = $::selinux::config::module_build_dir
$module_file = "${module_dir}/${title}"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$::selinux::config::module_build_dir should be $::selinux::module_build_dir?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's another instance in validate_absolute_path that didn't get highlighted

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

::selinux::config::module_build_dir != ::selinux::module_build_root and ::selinux::module_build_dir does not exist.

you created this var here: https://github.com/voxpupuli/puppet-selinux/pull/189/files#diff-ca85ef38c9b99f20d2d1c8d646a10e77R47 - it confused me too know. maybe we could come up with something more intuitive? ;-)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, yeah, the naming is too close together... Hm. is module_source_dir any better?

@vinzent
Copy link
Contributor Author

vinzent commented Feb 10, 2017

Does the single-dir-building still work idempotently and correctly remove the sources when puppet stops managing a resource?

I suspect a problem when you manage policy A with .te and .fc and then update the manifest to only manage the .te. Then the .fc file will not get removed.

@oranenj
Copy link
Contributor

oranenj commented Feb 15, 2017

@vinzent, do you think there's still something this needs, or could this be merged? I think the interface is fine as it is at least for my usecases, and also allows for backwards-compatible extension later on if needed.

This commit also introduces an alternative 'simple' builder to
refpolicy, and consequently the 'selinux-policy-devel' package
is not always needed
@vinzent
Copy link
Contributor Author

vinzent commented Feb 16, 2017 via email

@vinzent vinzent changed the title (DONT MERGE) Extension to module refactor Redesign selinux::module defined type Feb 16, 2017
@oranenj
Copy link
Contributor

oranenj commented Feb 16, 2017

@vinzent: looks good to me.

If multiple refpolicy style modules are built and
interfaces are used they need to reside in the same
directory so the interfaces are found.
@vinzent
Copy link
Contributor Author

vinzent commented Feb 17, 2017

added a small fix for the selinux_module_refpolicy acceptance test. Upcoming selinux tools 2.6 (in f26) will not allow to grant usr_t some permissions (which is a good check).

Re-run the acceptance tests on CentOS6, CentOS7, Fedora 24 and Fedora 25. All green.

@vinzent vinzent merged commit 836e3ae into voxpupuli:master Feb 17, 2017
@vinzent vinzent mentioned this pull request Feb 17, 2017
@vinzent vinzent changed the title Redesign selinux::module defined type BREAKING: Redesign selinux::module defined type Mar 29, 2017
@oranenj oranenj added the duplicate This issue or pull request already exists label Mar 29, 2017
@oranenj
Copy link
Contributor

oranenj commented Mar 29, 2017

I added a duplicate label to get this out of the changelog in favour of the issue

EmRowlands pushed a commit to EmRowlands/puppet-selinux that referenced this pull request Mar 29, 2023
…cy_test

Redesign selinux::module defined type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backwards-incompatible duplicate This issue or pull request already exists enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BREAKING: Redesign selinux::module parameters selinux::module should not manage files in /usr
2 participants