Skip to content
This repository has been archived by the owner on Jul 2, 2018. It is now read-only.

selinux: fix context of secure_mode_policyload boolean #102

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

selinux: fix context of secure_mode_policyload boolean #102

wants to merge 1 commit into from

Conversation

cgzones
Copy link
Contributor

@cgzones cgzones commented Feb 27, 2017

genfscon in interfaces seems not to work

@@ -32,6 +32,8 @@
## </param>
#
interface(`selinux_labeled_boolean',`
refpolicywarn(`$0($*) has been deprecated.')
Copy link
Contributor

Choose a reason for hiding this comment

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

No, this will not be deprecated. Even though there is only one use in refpolicy, I want this interface to continue for users to use.

@@ -1 +1,5 @@
# This module currently does not have any file contexts.

/sys/fs/selinux(/.*)? gen_context(system_u:obkect_r:security_t,s0)
/sys/fs/selinux/null -c gen_context(system_u:object_r:null_device_t,s0)
Copy link
Contributor

Choose a reason for hiding this comment

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

null_device_t does not belong in this module.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

null_device_t is a base type, so there should be no dependency problem.
i put it here for locality, because in the device module this file-context line might loose its cohesiveness (from the maintenance pov)
but i can chance this

type secure_mode_policyload_t;
selinux_labeled_boolean(secure_mode_policyload_t, secure_mode_policyload)
type secure_mode_policyload_t, boolean_type;
genfscon selinuxfs /booleans/secure_mode_policyload gen_context(system_u:object_r:secure_mode_policyload_t,s0)
Copy link
Contributor

Choose a reason for hiding this comment

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

This change should be dropped.

@cgzones
Copy link
Contributor Author

cgzones commented Mar 1, 2017

the problem, and the reason for this pr, is that i could not get the genfscon statement inside the selinux_labeled_boolean interface to work. i checked via

make conf
make validate
seinfo tmp/policy.bin --genfscon | grep selinuxfs

@cgzones
Copy link
Contributor Author

cgzones commented Mar 3, 2017

i'll fix the obkect_r misspelling with the next version

@pebenito
Copy link
Contributor

pebenito commented Mar 5, 2017

I will have to investigate further, as this has worked in the past. I need to make sure there isn't a compiler problem.

genfscon in interfaces seems not to work
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants