platform_external_selinux/libselinux/man/man3/set_matchpathcon_flags.3
Guillem Jover 6ef13eeda7 libselinux: man: Fix man pages formatting
- Add man page sections '(N)' to external references, and '()' on
  functions described in the same man page.
- Escape minus signs when those are expected to be used on the command
  line or files.
- Mark files and variables in italic; Note headings, function names,
  constants, program options and man page references in bold.
- Do not justify and hyphenate SEE ALSO section, and avoid hyphenation
  on symbol names by prepending them with \%.
- Remove trailing dot from NAME section description.
- Split sections with a no-op command '.', to visually distinguish them
  but to avoid introducing spurious vertical space in the formatted
  output.
- Add explicit .sp commands in the SYNOPSIS section between function
  prototypes, and fix space placement in function protoypes.
- Split header includes with .br (instead of the explicit or implicit
  .sp) so that they are vertically contiguous.
- Add missing {} around SELINUXTYPE and POLICYTYPE variable text in
  paths.
- Remove unneeded formatting commands.
- Remove spurious blank lines.

Signed-off-by: Guillem Jover <guillem@debian.org>
Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Dan Walsh <dwalsh@redhat.com>
2013-02-05 20:14:43 -05:00

62 lines
2.1 KiB
Groff

.TH "set_matchpathcon_flags" "3" "21 November 2009" "sds@tycho.nsa.gov" "SELinux API documentation"
.SH "NAME"
set_matchpathcon_flags, set_matchpathcon_invalidcon, set_matchpathcon_printf \- set flags controlling the operation of matchpathcon or matchpathcon_index and configure the behaviour of validity checking and error displaying
.
.SH "SYNOPSIS"
.B #include <selinux/selinux.h>
.sp
.BI "void set_matchpathcon_flags(unsigned int " flags ");"
.sp
.BI "void set_matchpathcon_invalidcon(int (*" f ")(const char *" path ", unsigned " lineno ", char *" context "));"
.sp
.BI "void set_matchpathcon_printf(void (*" f ")(const char *" fmt ", ...));"
.
.SH "DESCRIPTION"
.BR set_matchpathcon_flags ()
sets the flags controlling the operation of
.BR matchpathcon_init (3)
and subsequently
.BR matchpathcon_index (3)
or
.BR matchpathcon (3).
If the
.B MATCHPATHCON_BASEONLY
flag is set, then only the base file contexts configuration file
will be processed, not any dynamically generated entries or local customizations.
.sp
.BR set_matchpathcon_invalidcon ()
sets the function used by
.BR matchpathcon_init (3)
when checking the validity of a context in the file contexts
configuration. If not set, then this defaults to a test based
on
.BR security_check_context (3),
which checks validity against the active policy on a SELinux system.
This can be set to instead perform checking based on a binary policy file,
e.g. using
.BR sepol_check_context (3),
as is done by
.B setfiles \-c.
The function is also responsible for reporting any such error, and
may include the
.I path
and
.I lineno
in such error messages.
.sp
.BR set_matchpathcon_printf ()
sets the function used by
.BR matchpathcon_init (3)
when displaying errors about the file contexts configuration. If not set,
then this defaults to fprintf(stderr, fmt, ...). This can be set to redirect
error reporting to a different destination.
.
.SH "RETURN VALUE"
Returns zero on success or \-1 otherwise.
.
.SH "SEE ALSO"
.ad l
.nh
.BR selinux "(8), " matchpathcon "(3), " matchpathcon_index "(3), " set_matchpathcon_invalidcon "(3), " set_matchpathcon_printf "(3), " freecon "(3), " setfilecon "(3), " setfscreatecon "(3)"