summaryrefslogtreecommitdiff
path: root/doc/glibc-functions/getfilecon-desc.texi
blob: 4decb3b78bcd1f29cf76f8143bfa3a2ea5863d31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
@macro getfileconDesc{fn}
Gnulib module: selinux-h

Portability problems fixed by Gnulib:
@itemize
@item
This function exists only on Linux and is therefore
missing on all non-glibc platforms:
macOS 11.1, FreeBSD 12.0, NetBSD 9.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.4, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
On those platforms, this module provides a stub that always sets
@code{errno} to @code{ENOTSUP} and returns @samp{-1}.
@item
On systems with SELinux support, this module provides a wrapper for the
@code{\fn\} function that insulates the caller from API-nonconforming behavior.
Without this wrapper, @code{\fn\} can return @samp{0} and set
the @code{context} pointer to NULL, and in another scenario can return
@samp{10} and set the @code{context} pointer to @samp{unlabeled}.
This wrapper returns @samp{-1} in each case and sets @code{errno} to
@code{ENOTSUP} and @code{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.
@end itemize

Portability problems not fixed by Gnulib:
@itemize
@end itemize
@end macro