Re: how do I use selabel to get an x selection object context

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Xavier Toth wrote:
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 majordomo@xxxxxxxxxxxxx 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);


--
Eamon Walsh <ewalsh@xxxxxxxxxxxxx>
National Security Agency

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@xxxxxxxxxxxxx with
the words "unsubscribe selinux" without quotes as the message.

[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux