diff options
author | Guillem Jover <guillem@debian.org> | 2012-11-13 21:15:34 +0100 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2013-02-05 20:14:43 -0500 |
commit | 6ef13eeda7697bc7b816c98817204f25ffb87a00 (patch) | |
tree | f9bcdaac118428abf3d5021cae378d59d3d9b552 /libselinux/man/man3/context_new.3 | |
parent | 8cc79bcd981abb616ad9cafebcb4302acf392311 (diff) | |
download | android_external_selinux-6ef13eeda7697bc7b816c98817204f25ffb87a00.tar.gz android_external_selinux-6ef13eeda7697bc7b816c98817204f25ffb87a00.tar.bz2 android_external_selinux-6ef13eeda7697bc7b816c98817204f25ffb87a00.zip |
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>
Diffstat (limited to 'libselinux/man/man3/context_new.3')
-rw-r--r-- | libselinux/man/man3/context_new.3 | 88 |
1 files changed, 52 insertions, 36 deletions
diff --git a/libselinux/man/man3/context_new.3 b/libselinux/man/man3/context_new.3 index 820f927f..02574457 100644 --- a/libselinux/man/man3/context_new.3 +++ b/libselinux/man/man3/context_new.3 @@ -1,61 +1,77 @@ .TH "context_new" "3" "20 December 2011" "dwalsh@redhat.com" "SELinux API documentation" .SH "NAME" context_new, context_str, context_free, context_type_get, context_type_set, context_range_get, context_range_set,context_role_get, context_role_set, context_user_get, context_user_set \- Routines to manipulate SELinux security contexts - +. .SH "SYNOPSIS" .B #include <selinux/context.h> - +.sp .BI "context_t context_new(const char *" context_str ); - +.sp .BI "const char * context_str(context_t " con ); - +.sp .BI "void context_free(context_t " con ); - +.sp .BI "const char * context_type_get(context_t " con ); - +.sp .BI "const char * context_range_get(context_t " con ); - +.sp .BI "const char * context_role_get(context_t " con ); - +.sp .BI "const char * context_user_get(context_t " con ); - +.sp .BI "int context_type_set(context_t " con ", const char *" type ); - +.sp .BI "int context_range_set(context_t " con ", const char *" range ); - +.sp .BI "int context_role_set(context_t " con ", const char *" role ); - +.sp .BI "int context_user_set(context_t " con ", const char *" user ); - +. .SH "DESCRIPTION" These functions allow an application to manipulate the fields of a security context string without requiring it to know the format of the string. -context_new - Return a new context initialized to a context string - -context_str - Return a pointer to the string value of the context_t -Valid until the next call to context_str or context_free -for the same context_t* - -context_free - Free the storage used by a context - -context_type_get, context_range_get, context_role_get, context_user_get - Get a pointer to the string value of a context component - -.B NOTE: +.BR context_new () +returns a new context initialized to a context string. + +.BR context_str () +returns a pointer to the string value of the +.BR context_t , +valid until the next call to +.BR context_str () +or +.BR context_free () +for the same +.BR context_t* . + +.BR context_free () +frees the storage used by a context. + +.BR context_type_get (), +.BR context_range_get (), +.BR context_role_get (), +.BR \%context_user_get () +get a pointer to the string value of a context component. + +.B Note: Values returned by the get functions are only valid until the next call -to a set function or context_free() for the same context_t structure. - -context_type_set, context_range_set, context_role_set, context_user_set - Set a context component - +to a set function or +.BR context_free () +for the same +.B context_t +structure. + +.BR context_type_set (), +.BR context_range_set (), +.BR context_role_set (), +.BR \%context_user_set () +set a context component. +. .SH "RETURN VALUE" -On success, zero is returned. On failure, -1 is returned and errno is -set appropriately. - +On success, zero is returned. On failure, \-1 is returned and +.I errno +is set appropriately. +. .SH "SEE ALSO" .BR selinux "(8)" |