mirror of
https://git.savannah.gnu.org/git/gnulib.git
synced 2025-08-18 23:42:00 +03:00
* lib/getfilecon.c: New file. * lib/se-selinux.in.h: Use a better inclusion guard symbol name. [HAVE_SELINUX_SELINUX_H]: Include-next <selinux/selinux.h>. [!HAVE_SELINUX_SELINUX_H]: Use better parameter names. (fgetfilecon): Provide a stub. * m4/selinux-selinux-h.m4 (gl_HEADERS_SELINUX_SELINUX_H): Don't AC_SUBST SELINUX_SELINUX_H, since now we're generating that file unconditionally. When <selinux/selinux.h> is found, arrange to use wrappers. * modules/selinux-h (Files): Add getfilecon.c. (Makefile.am): Substitute include-next-related bits into the now-always-generated selinux/selinux.h file. * doc/glibc-functions/getfilecon.texi: New file. * doc/glibc-functions/lgetfilecon.texi: New file. * doc/glibc-functions/fgetfilecon.texi: New file. * doc/glibc-functions/getfilecon-desc.texi: New file. * doc/gnulib.texi (Glibc selinux/selinux.h): New section, by which to pull in the new files. * MODULES.html.sh (Misc): Add selinux-h.
28 lines
1.1 KiB
Plaintext
28 lines
1.1 KiB
Plaintext
@macro getfileconDesc{fn}
|
|
Gnulib module: selinux-h
|
|
|
|
Portability problems fixed by Gnulib:
|
|
@itemize
|
|
@item
|
|
This function is missing on some platforms:
|
|
MacOS X 10.3, OpenBSD 3.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, mingw, Interix 3.5, BeOS.
|
|
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
|