secon (Was: Policycoreutils patch)
Quoted 6 lines · Daniel J Walsh
Broken audit2allow into two packages including
avc.pyso that other tools can use it.Began adding code to allow it to analyze AVC message and use plugin architecture to translate avc messages.
Quoted 7 lines
Internationailization code added.
Some po files translated.
Fixes for semanage
Cleanup of code
What is the purpose of the secon utility added by this patch? Assuming that it is useful, a few quick comments on the implementation:
- The my_getXcon_raw functions should be moved into libselinux (without the my_ prefix, of course) so that we don't need any code outside of libselinux directly reading /proc/pid/attr files.
- Falling back to the current context when the exec or fscreate context is not set is not correct. Absence of exec or fscreate context just means that the default policy behavior (e.g. type_transition or default inheritance) will be applied. While default inheritance would mean that the current context is applied for exec, there could be a type_transition, and it makes no sense at all for fscreate (where default inheritance combines information from the current context with the parent directory context). I think you just want to report NULL / none or similar to the user.
- The call to selinux_trans_to_raw_context() doesn't make sense since you are already calling the _raw functions. If opt->disp_raw is set, then no further processing should be required, right?
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.
Quoted 8 lines · Stephen Smalley
Quoted 6 lines · Daniel J Walsh
Broken audit2allow into two packages including
avc.pyso that other tools can use it.Began adding code to allow it to analyze AVC message and use plugin architecture to translate avc messages.
Internationailization code added.
Quoted 9 lines
Quoted 6 lines
Some po files translated.
Fixes for semanage
Cleanup of code
What is the purpose of the secon utility added by this patch?
The idea is to be able to use utility within bash to show what role/type you are in at the prompt.
James Antill built it and is experimenting with some other features. We could obviously do this with python bindings, but wanted something light weight to handle MLS type situations.
Quoted 8 lines
Assuming that it is useful, a few quick comments on the implementation:
- Themy_getXcon_rawfunctions should be moved into libselinux (without themy_prefix, of course) so that we don't need any code outside of libselinux directly reading/proc/pid/attrfiles.
- Falling back to the current context when the exec or fscreate context is not set is not correct. Absence of exec or fscreate context just means that the default policy behavior (e.g.type_transitionor default inheritance) will be applied. While default inheritance would mean that
Quoted 10 lines
the current context is applied for exec, there could be a
type_transition, and it makes no sense at all for fscreate (where default inheritance combines information from the current context with the parent directory context). I think you just want to report NULL / none or similar to the user.
- The call toselinux_trans_to_raw_context()doesn't make sense since you are already calling the_rawfunctions. Ifopt->disp_rawis set, then no further processing should be required, right?
I have passed on your comments and we will get out a patch.
--
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.