Security ID's (SID's) are opaque representations of security
contexts, managed by the userspace AVC.
avc_context_to_sid() returns a SID for the given context in the
memory referenced by sid.
avc_sid_to_context() returns a copy of the context represented by sid
in the memory referenced by ctx. The user must free the copy with
avc_get_initial_sid() returns a SID for the kernel initial security
identifier specified by name.
As of libselinux version 2.0.86, SID's are no longer reference
counted. A SID will be valid from the time it is first obtained
until the next call to avc_destroy(3). The sidget(3) and sidput(3)
functions, formerly used to adjust the reference count, are no-ops
and are deprecated.
This page is part of the selinux (Security-Enhanced Linux user-space
libraries and tools) project. Information about the project can be
found at ⟨https://github.com/SELinuxProject/selinux/wiki⟩. If you
have a bug report for this manual page, see
page was obtained from the project's upstream Git repository
⟨https://github.com/SELinuxProject/selinux⟩ on 2017-03-13. If you
discover any rendering problems in this HTML version of the page, or
you believe there is a better or more up-to-date source for the page,
or you have corrections or improvements to the information in this
COLOPHON (which is not part of the original manual page), send a mail
27 May 2004 avc_context_to_sid(3)