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

Get CLIP RHEL7 Booting in Enforcing #86

Closed
5 of 11 tasks
mpalmi opened this issue Jan 13, 2015 · 6 comments
Closed
5 of 11 tasks

Get CLIP RHEL7 Booting in Enforcing #86

mpalmi opened this issue Jan 13, 2015 · 6 comments

Comments

@mpalmi
Copy link
Contributor

mpalmi commented Jan 13, 2015

The first step in addressing #4 is to get CLIP booting in Enforcing.

With the new systemd architecture, there are some significant changes to the way processes spawn.
We will need to pull in Chris PeBenito's changes to the RHEL7 updates to refpolicy (https://github.com/pebenito/refpolicy), specifically the following commits:

From there, it is a matter of typical policy development. Gather denials, write policy, wash, rinse, repeat.


As of 4/22, we are able to boot in Enforcing with several permissive domains:
tomhurd/clip@646f163
tomhurd/clip@498ddcd

We really only need a subset of these to be permissive, however:

  • kernel_t
  • initrc_t
  • init_t
  • syslogd_t
  • lvm_t
  • udev_t

The future efforts will be driven by pulling all domains out of permissive, but for the sake of getting CLIP booting in Enforcing, the following are the priority:

To get CLIP cleanly booting in Enforcing, the following will need to be done as well:

Some nice-to-haves (not necessarily needed to get CLIP booting in Enforcing):

@mpalmi mpalmi added the selinux label Jan 13, 2015
@mpalmi mpalmi self-assigned this Jan 13, 2015
@mpalmi mpalmi added this to the RHEL 7 milestone Jan 13, 2015
@ghost ghost mentioned this issue Jan 13, 2015
mpalmi pushed a commit to mpalmi/clip that referenced this issue Jan 15, 2015
…y CLIP

- These were removed when pulling in a new refpolicy (#699d65b)
- Remove unneeded files
- Secstate is no longer needed, so it may be removed
mpalmi pushed a commit to mpalmi/clip that referenced this issue Jan 15, 2015
mpalmi pushed a commit to mpalmi/clip that referenced this issue Jan 15, 2015
mpalmi pushed a commit to mpalmi/clip that referenced this issue Jan 15, 2015
mpalmi added a commit to mpalmi/clip that referenced this issue Jan 15, 2015
@mpalmi
Copy link
Contributor Author

mpalmi commented Jan 20, 2015

Rather than cherry-pick commits, we have updated the base refpolicy to pebenito/refpolicy@5fd2953

Further development is being done on top of this to get CLIP booting in Enforcing.

mpalmi added a commit to mpalmi/clip that referenced this issue Jan 20, 2015
mpalmi added a commit to mpalmi/clip that referenced this issue Feb 2, 2015
mpalmi pushed a commit to mpalmi/clip that referenced this issue Feb 2, 2015
mpalmi added a commit to mpalmi/clip that referenced this issue Feb 2, 2015
- Pull in @csmith-tresys's additional interfaces and policy
- Separate systemd-service forks into their own contexts
- Use existing policy for the following:
	contrib/readahead (systemd-readahead)
	contrib/shutdown (systemd-shutdown)
	system/fstools (systemd-fsck)
	system/hostname (systemd-hostname)
	system/logging (systemd-journald)
- Give systemd-utmp can_relabelto_binary_policy to clear up constraints
mpalmi added a commit to mpalmi/clip that referenced this issue Feb 4, 2015
- Pull in @csmith-tresys's additional interfaces and policy
- Separate systemd-service forks into their own contexts
- Use existing policy for the following:
	contrib/readahead (systemd-readahead)
	contrib/shutdown (systemd-shutdown)
	system/fstools (systemd-fsck)
	system/hostname (systemd-hostname)
	system/logging (systemd-journald)
- Give systemd-utmp can_relabelto_binary_policy to clear up constraints
mpalmi added a commit to mpalmi/clip that referenced this issue Feb 4, 2015
- Pull in @csmith-tresys's additional interfaces and policy
- Separate systemd-service forks into their own contexts
- Use existing policy for the following:
	contrib/readahead (systemd-readahead)
	contrib/shutdown (systemd-shutdown)
	system/fstools (systemd-fsck)
	system/hostname (systemd-hostname)
	system/logging (systemd-journald)
- Give systemd-utmp can_relabelto_binary_policy to clear up constraints
mpalmi added a commit to mpalmi/clip that referenced this issue Feb 5, 2015
- Pull in @csmith-tresys's additional interfaces and policy
- Separate systemd-service forks into their own contexts
- Use existing policy for the following:
	contrib/readahead (systemd-readahead)
	contrib/shutdown (systemd-shutdown)
	system/fstools (systemd-fsck)
	system/hostname (systemd-hostname)
	system/logging (systemd-journald)
- Give systemd-utmp can_relabelto_binary_policy to clear up constraints
mpalmi added a commit to mpalmi/clip that referenced this issue Feb 5, 2015
- Many /sbin/ file contexts do not have their corresponding /usr/sbin files
labeled properly. Label them en mass and sort contexts appropriately.
mpalmi added a commit to mpalmi/clip that referenced this issue Feb 5, 2015
- Many /sbin/ file contexts do not have their corresponding /usr/sbin files
labeled properly. Label them en mass and sort contexts appropriately.
mpalmi added a commit to mpalmi/clip that referenced this issue Feb 5, 2015
- Pull in @csmith-tresys's additional interfaces and policy
- Separate systemd-service forks into their own contexts
- Use existing policy for the following:
	contrib/readahead (systemd-readahead)
	contrib/shutdown (systemd-shutdown)
	system/fstools (systemd-fsck)
	system/hostname (systemd-hostname)
	system/logging (systemd-journald)
- Give systemd-utmp can_relabelto_binary_policy to clear up constraints
mpalmi added a commit to mpalmi/clip that referenced this issue Feb 12, 2015
- Pull in @csmith-tresys's additional interfaces and policy
- Separate systemd-service forks into their own contexts
- Use existing policy for the following:
	contrib/readahead (systemd-readahead)
	contrib/shutdown (systemd-shutdown)
	system/fstools (systemd-fsck)
	system/hostname (systemd-hostname)
	system/logging (systemd-journald)
- Add some file_contexts.subs_dist mappings
- Label some unlabeled files
mpalmi added a commit to mpalmi/clip that referenced this issue Feb 12, 2015
…olicy

- Get rid of conditional and remove redundant policy.
mpalmi pushed a commit to mpalmi/clip that referenced this issue Feb 13, 2015
mpalmi added a commit to mpalmi/clip that referenced this issue Feb 13, 2015
… scripts

Systemd still supports traditional init scripts, so modify init_daemon_domain
and init_system_domain to allow both initrc_t and init_t transitions if
systemd policy is turned on. Else, default to only intrc_t transitions.
mpalmi added a commit to mpalmi/clip that referenced this issue Feb 13, 2015
- Pull in @csmith-tresys's additional interfaces and policy
- Separate systemd-service forks into their own contexts
- Use existing policy for the following:
	contrib/readahead (systemd-readahead)
	contrib/shutdown (systemd-shutdown)
	system/fstools (systemd-fsck)
	system/hostname (systemd-hostname)
	system/logging (systemd-journald)
- Add some file_contexts.subs_dist mappings
- Label some unlabeled files
- Make semanage_t an init_system_domain, so initrc_t can transition to semanage
and run genhomedircon.
- Begin labeling unit files
mpalmi added a commit to mpalmi/clip that referenced this issue Feb 13, 2015
- Pull in @csmith-tresys's additional interfaces and policy
- Separate systemd-service forks into their own contexts
- Use existing policy for the following:
	contrib/readahead (systemd-readahead)
	contrib/shutdown (systemd-shutdown)
	system/fstools (systemd-fsck)
	system/hostname (systemd-hostname)
	system/logging (systemd-journald)
- Add some file_contexts.subs_dist mappings
- Label some unlabeled files
- Make semanage_t an init_system_domain, so initrc_t can transition to semanage
and run genhomedircon.
- Begin labeling unit files
mpalmi pushed a commit to mpalmi/clip that referenced this issue Feb 14, 2015
mpalmi added a commit to mpalmi/clip that referenced this issue Feb 14, 2015
… scripts

Systemd still supports traditional init scripts, so modify init_daemon_domain
and init_system_domain to allow both initrc_t and init_t transitions if
systemd policy is turned on. Else, default to only intrc_t transitions.
mpalmi added a commit to mpalmi/clip that referenced this issue Feb 14, 2015
- Pull in @csmith-tresys's additional interfaces and policy
- Separate systemd-service forks into their own contexts
- Use existing policy for the following:
	contrib/readahead (systemd-readahead)
	contrib/shutdown (systemd-shutdown)
	system/fstools (systemd-fsck)
	system/hostname (systemd-hostname)
	system/logging (systemd-journald)
- Add some file_contexts.subs_dist mappings
- Label some unlabeled files
- Make semanage_t an init_system_domain, so initrc_t can transition to semanage
and run genhomedircon.
- Begin labeling unit files
mpalmi added a commit to mpalmi/clip that referenced this issue Feb 14, 2015
- Separate systemd-service forks into their own contexts
- Use existing policy for the following:
	contrib/readahead (systemd-readahead)
	contrib/shutdown (systemd-shutdown)
	system/fstools (systemd-fsck)
	system/hostname (systemd-hostname)
	system/logging (systemd-journald)
- Add some file_contexts.subs_dist mappings
- Label some unlabeled files
- Make semanage_t an init_system_domain, so initrc_t can transition to semanage
and run genhomedircon.
- Begin labeling unit files
@ghost
Copy link

ghost commented Apr 23, 2015

@mpalmi please assign a time estimate label for this issue.

@mpalmi
Copy link
Contributor Author

mpalmi commented Apr 24, 2015

We are currently able to boot in Enforcing, using several permissive domains.
The future tasks will be focused on taking these domains out of permissive.

See:
tomhurd/clip@646f163
tomhurd/clip@498ddcd

mpalmi pushed a commit to mpalmi/clip that referenced this issue Apr 27, 2015
mpalmi added a commit to mpalmi/clip that referenced this issue Apr 27, 2015
… scripts

Systemd still supports traditional init scripts, so modify init_daemon_domain
and init_system_domain to allow both initrc_t and init_t transitions if
systemd policy is turned on. Else, default to only intrc_t transitions.
mpalmi added a commit to mpalmi/clip that referenced this issue Apr 27, 2015
- Separate long-running processes/daemons into their own contexts
- Let short-running processes fall through to initrc
- Label unit files
- Add some file_contexts.subs_dist mappings
mpalmi added a commit to mpalmi/clip that referenced this issue Apr 27, 2015
mpalmi pushed a commit to mpalmi/clip that referenced this issue Apr 27, 2015
Fix formatting of systemd interfaces
mpalmi pushed a commit to mpalmi/clip that referenced this issue Apr 27, 2015
Add permissions for systemd. Mostly systemd_logind_t
mpalmi pushed a commit to mpalmi/clip that referenced this issue Apr 27, 2015
Add permissions for shutdown_t and sshd_keygen_t
mpalmi added a commit to mpalmi/clip that referenced this issue Apr 27, 2015
mpalmi added a commit to mpalmi/clip that referenced this issue Apr 27, 2015
@mpalmi
Copy link
Contributor Author

mpalmi commented May 22, 2015

Though we're booting in Enforcing, there are still some lingering denials.
Attached are the errors that are seen on boot
image

Potentially related to denials seen in:
#118
#130
#164
#126
#128

@tomhurd
Copy link
Contributor

tomhurd commented May 22, 2015

The /lib/systemd/rhel-autorelabel problem is related to issue #127.

I expect the contexts that aren't valid are from rhel targeted policy and not in the clip policy.

mpalmi added a commit that referenced this issue Jun 2, 2015
Issue #86 - Include RHEL_7-Alpha3 policy doc in README.md
mpalmi added a commit to mpalmi/clip that referenced this issue Jun 4, 2015
- Include systemd policy via init_systemd ifdef
- Various Makefile/specfile changes
- Modify init interfaces to support old init scripts
-- Systemd still supports traditional init scripts, so modify
init_daemon_domain and init_system_domain to allow both initrc_t and init_t
transitions if systemd policy is turned on. Else, default to only intrc_t
transitions.
- Separate long-running processes/daemons into their own contexts
- Let short-running processes fall through to initrc
- Label unit files
- Add some file_contexts.subs_dist mappings
- Updates for systemd_logind_t
- Add permissions for systemd_logind_t
mpalmi added a commit to mpalmi/clip that referenced this issue Jun 4, 2015
mpalmi added a commit to mpalmi/clip that referenced this issue Jun 4, 2015
- Include systemd policy via init_systemd ifdef
- Various Makefile/specfile changes
- Modify init interfaces to support old init scripts
-- Systemd still supports traditional init scripts, so modify
init_daemon_domain and init_system_domain to allow both initrc_t and init_t
transitions if systemd policy is turned on. Else, default to only intrc_t
transitions.
- Separate long-running processes/daemons into their own contexts
- Let short-running processes fall through to initrc
- Label unit files
- Add some file_contexts.subs_dist mappings
- Updates for systemd_logind_t
- Add permissions for systemd_logind_t
mpalmi added a commit to mpalmi/clip that referenced this issue Jun 4, 2015
@mpalmi
Copy link
Contributor Author

mpalmi commented Jun 4, 2015

Closing the master ticket for now, even though all subtickets are not completely resolved. Will open future tickets to fix issues found in testing.

@mpalmi mpalmi closed this as completed Jun 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants