Previous: getfilecon
, Up: Glibc Extensions to <selinux/selinux.h>
[Contents][Index]
lgetfilecon
Documentation:
man lgetfilecon
Gnulib module: selinux-h
Portability problems fixed by Gnulib:
errno
to ENOTSUP
and returns ‘-1’.
lgetfilecon
function that insulates the caller from API-nonconforming behavior.
Without this wrapper, lgetfilecon
can return ‘0’ and set
the context
pointer to NULL, and in another scenario can return
‘10’ and set the context
pointer to ‘unlabeled’.
This wrapper returns ‘-1’ in each case and sets errno
to
ENOTSUP
and ENODATA
respectively.
While the conditions that can provoke such behavior are rare, the
average caller does not handle them because the possibility of such
behavior is not documented.
Portability problems not fixed by Gnulib: