Skip to contentSkip to conversation

Switch between struct security_context_t and context_t

DISCUSSION Mario Fanelli 2 participants 2 messages Jun 5, 2006 SELinux security module

lore
Share & tools
lore
#0 lore raw

I'm writing some simple program that uses SELinux Api but I don't find any function that transform a security_context_t variable in context_t. It's possible to force cast but if exists a function that performance this operation is better...
Anyone can give me an help?

--
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 5 lines · Mario Fanelli

I'm writing some simple program that uses SELinux Api but I don't find any function that transform a security_context_t variable in context_t. It's possible to force cast but if exists a function that performance this operation is better...
Anyone can give me an help?

You want to use:

context_t context_new(const char *);

...you can see it being used in the secon program in policycoreutils.

Signature · 1 line
James Antill <[email protected]>