getfilecon ¶Documentation:
man getfilecon
Portability problems fixed by Gnulib:
errno to ENOTSUP and returns ‘-1’.
getfilecon function that insulates the caller from API-nonconforming behavior.
Without this wrapper, getfilecon 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: