Incorrect comment or toolchain problem in refpolicy policy/modules/kernel/kernel.te?
Hello All,
I found the following comment in the kernel.te refpolicy module:
# These initial sids are no longer used, and can be removed:
So naturally, I attempted to remove the sids ... but I got the following error when compiling the policy:
Compiling refpolicy policy.21/usr/bin/checkpolicy policy.conf -o policy.21 /usr/bin/checkpolicy: loading policy configuration from policy.conf libsepol.policydb_load_isids: SID (null) was never defined
make: *** [policy.21] Error 1
I do go through all the sids and commented each one out individually
to see if there was a subset that could be removed. What I found is
that if any of the sids were removed, it caused a compile error.
Is the comment in the module incorrect? Or is this a toolchain problem?
Thanks!
- Ryan
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 15 lines · Ryan Bradetich
Hello All,
I found the following comment in the kernel.te refpolicy module:
# These initial sids are no longer used, and can be removed:
So naturally, I attempted to remove the sids ... but I got the following error when compiling the policy:
Compiling refpolicy policy.21
/usr/bin/checkpolicypolicy.conf -o policy.21/usr/bin/checkpolicy: loading policy configuration from policy.conf libsepol.policydb_load_isids: SID (null) was never defined
make: *** [policy.21] Error 1
Quoted 5 lines
I do go through all the sids and commented each one out individually
to see if there was a subset that could be removed. What I found is
that if any of the sids were removed, it caused a compile error.Is the comment in the module incorrect? Or is this a toolchain problem?
The initial SIDs are declared in the flask/ files, then mapped to contexts by the definitions in refpolicy. Removing them would require removing them from both places _and_ regenerating the kernel headers _and_ rebuilding the kernel if the removal affected the values of any other initial SIDs (which it would if there are any other initial SIDs that follow the removed ones in the declaration list). Tight coupling to the kernel, as with the class and permission definitions.
Signature · 8 lines
Stephen Smalley National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Hello Stephen,
Is this something the community wants to pursue?
i.e. should I submit patches to do this?
Thanks!
- Ryan
Quoted 30 lines · Stephen Smalley
Quoted 15 lines · Ryan Bradetich
Hello All,
I found the following comment in the kernel.te refpolicy module:
# These initial sids are no longer used, and can be removed:
So naturally, I attempted to remove the sids ... but I got the following error when compiling the policy:
Compiling refpolicy policy.21
/usr/bin/checkpolicypolicy.conf -o policy.21/usr/bin/checkpolicy: loading policy configuration from policy.conf libsepol.policydb_load_isids: SID (null) was never defined
make: *** [policy.21] Error 1Quoted 5 lines
I do go through all the sids and commented each one out individually
to see if there was a subset that could be removed. What I found is
that if any of the sids were removed, it caused a compile error.Is the comment in the module incorrect? Or is this a toolchain problem?
The initial SIDs are declared in the flask/ files, then mapped to contexts by the definitions in refpolicy. Removing them would require removing them from both places _and_ regenerating the kernel headers _and_ rebuilding the kernel if the removal affected the values of any other initial SIDs (which it would if there are any other initial SIDs that follow the removed ones in the declaration list). Tight coupling to the kernel, as with the class and permission definitions.
Quoted 5 lines
--
Stephen Smalley
National Security Agency
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 4 lines · Ryan Bradetich
Hello Stephen,
Is this something the community wants to pursue?
i.e. should I submit patches to do this?
Not without a compatibility framework to allow seamless operation of old kernel / new policy and new kernel / old policy pairings.
Signature · 8 lines
Stephen Smalley National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.