api for getting setrans information
Are there apis to retrieve all of the categories and sensitivity levels and to convert them into a human readable form?
--
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 1 line · Ted X Toth
Are there apis to retrieve all of the categories and sensitivity levels and to convert them into a human readable form?
No, Not really, you either read the setrans.conf file directly, but this would break if you used a different translation library (mitre).
Or you could attempt to exhaustively search the namespace using:
extern int selinux_raw_to_trans_context(security_context_t raw,,
security_context_t *
transp);
Which would have 16 * 1024! (Factorial) combinations. IE It would take a long time.
If you call the functions and (raw == transp ) no translation.
--
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 2 lines · Ted X Toth
Are there apis to retrieve all of the categories and sensitivity levels and to convert them into a human readable form?
Can you give more information on how you would use it, or what kind of api you have used in the past for the same functionality? IOW, help propose an api that meets your requirements, and we can work through how to make it fit with SELinux.
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 11 lines · Stephen Smalley
Quoted 2 lines · Ted X Toth
Are there apis to retrieve all of the categories and sensitivity levels and to convert them into a human readable form?
Can you give more information on how you would use it, or what kind of api you have used in the past for the same functionality? IOW, help propose an api that meets your requirements, and we can work through how to make it fit with SELinux.
I was thinking about the newrole gui that we talked about at the SELinux Symposium. The gui might have a dropdown list of categories and a password entry field and it would exec a new window at level. I found seobject.py and the setransRecords class which will probably work for my purposes right now. I'm not sure if exposing all of the categories is an issue.
--
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.