Skip to contentSkip to conversation

Scope of SECMARK_MODE_SEL

DISCUSSION Casey Schaufler 2 participants 3 messages Aug 3, 2007 – Aug 4, 2007 SELinux security module

lore
Share & tools
lore
#0 lore raw

It is my assumption that SECMARK_MODE_SEL is defined and coded solely for use by SELinux and that it is not intended as a general purpose secmark for any random LSM to use. I assume that if another LSM wants to use SECMARK that it needs to supply its own SECMARK_MODE value and checkentry function.

Are my assumptions accurate?

Thank you.

Casey Schaufler
[email protected]

--
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.

#1 lore raw
Quoted 8 lines · Casey Schaufler

It is my assumption that SECMARK_MODE_SEL is defined and coded solely for use by SELinux and that it is not intended as a general purpose secmark for any random LSM to use. I assume that if another LSM wants to use SECMARK that it needs to supply its own SECMARK_MODE value and checkentry function.

Are my assumptions accurate?

Yes, and you likely also need to add your own entry to the union in struct xt_secmark_target_info, which I'd guess would simply be a smack_t.

- James

Signature · 7 lines
James Morris <[email protected]>


--
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.
#2 lore raw
Quoted 9 lines · --- James Morris
Quoted 7 lines · Casey Schaufler

It is my assumption that SECMARK_MODE_SEL is defined and coded solely for use by SELinux and that it is not intended as a general purpose secmark for any random LSM to use. I assume that if another LSM wants to use SECMARK that it needs to supply its own SECMARK_MODE value and checkentry function.

Quoted 4 lines
Quoted 1 line

Are my assumptions accurate?

Yes, and you likely also need to add your own entry to the union in struct xt_secmark_target_info, which I'd guess would simply be a smack_t.

Thank you. My question was really aimed at finding out if the code should be changed as part of the effort to pull SELinux dependencies out of the audit code. Smack and xfrm is a distinct set of work.

Casey Schaufler
[email protected]

--
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.