Creating a new lsm function
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'd like to create two new function's, which fill a buffer with lsm informations about an interface/ a socket. Both will simply give back the context. Also, for this two, a function will return a title for these fields. These function will be used to print out these informations in /proc/net/tcp, ... to be read by net-tools.
Can someone give me a hint, where this has to be implemented to be independent of the used security module?
Thanks
Torsten
- --
Domain in provider transition, hope for smoothness. Planed date is 24.7.2003 pub 1024D/4CD29A2C 2001-01-12 Torsten Knodt <[email protected]>
Schl.-Fingerabdruck = A2B1 C626 F819 7C58 B2F9 4F4C BF16 64B6 4CD2 9A2C
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQE+x7s0vxZktkzSmiwRAtCKAJ9a70iJksCaUjryHrT6QS7btVsOiACfaGrW qt8k5tNdc7J70BIiZ63OSEg=
=ii8d
-----END PGP SIGNATURE-----
--
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 5 lines · Torsten Knodt
I'd like to create two new function's, which fill a buffer with lsm informations about an interface/ a socket. Both will simply give back the context. Also, for this two, a function will return a title for these fields. These function will be used to print out these informations in
/proc/net/tcp, ... to be read by net-tools.
The idea is to have netstat display the security context.
Quoted 2 lines
Can someone give me a hint, where this has to be implemented to be independent of the used security module?
When 2.6.0 comes out with xattr being used in a consistant fashion for file system and process labelling and this being done in a text form it will hopefully be possible to make such things consistant across different modules.
I don't think that there's much chance of it for 2.4.x, all of the kernel programmers who are involved appear to be spending the vast majority of their time on 2.5.x. I don't think that there's much interest in doing anything big for 2.4.x, so anything that gets done will be based on SIDs for SE Linux which means that they won't be consistant across modules.
PS Have you tried playing with SE Linux and 2.5.x yet?
Signature · 10 lines
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark http://www.coker.com.au/postal/ Postal SMTP/POP benchmark http://www.coker.com.au/~russell/ My home page -- 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 · Torsten Knodt
I'd like to create two new function's, which fill a buffer with lsm informations about an interface/ a socket. Both will simply give back the context. Also, for this two, a function will return a title for these fields. These function will be used to print out these informations in
/proc/net/tcp, ... to be read by net-tools.Can someone give me a hint, where this has to be implemented to be independent of the used security module?
If you simply want to export the context of a socket to userspace, the old SELinux API supports that via getsockname_secure or fstat_secure. The new 2.5 SELinux API could support it via fgetxattr or possibly getsockopt, but we are presently only focused on the process attribute, file attribute, and security policy APIs in 2.5.
If you want to extend the LSM hook interface so that net/ipv4/tcp_ipv4.c:tcp_get_info can invoke a LSM hook to obtain a string representation of the security information that can be included in /proc/net/tcp, then you would do that by adding hook interface definitions to include/linux/security.h, dummy hook functions to security/dummy.c, SELinux implementations of those hook functions to security/selinux/hooks.c, and code that calls the hooks and uses the returned strings to net/ipv4/tcp_ipv4.c:tcp_get_info.
Signature · 8 lines
Stephen Smalley <[email protected]> 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.