how do I use selabel to get an x selection object context
I could use an example of using selabel to get a x object context if anyone has one.
--
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 9 lines · Xavier Toth
I could use an example of using selabel to get a x object context if anyone has one.
--
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.
Opening a handle:
label_hnd = selabel_open(SELABEL_CTX_X, NULL, 0); if (!label_hnd)
FatalError("SELinux: Failed to open x_contexts mapping in policy\n");Doing a lookup:
if (selabel_lookup(label_hnd, &ctx, name, SELABEL_X_SELN) < 0)
FatalError("SELinux: A lookup failed!");Closing:
freecon(ctx); selabel_close(label_hnd);
Signature · 7 lines
Eamon Walsh <[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.