aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@googlemail.com>2008-05-09 06:39:31 -0700
committerAndrew G. Morgan <morgan@kernel.org>2008-05-09 06:39:31 -0700
commit4eadce8d403a95aecaa2cd4dbfc73e81eab86d00 (patch)
tree0c7fa9123f5a5abd5ad978165235388866780771
parentbbff35aed9d6e1b4817312bd6b131a9ac4e42f55 (diff)
downloadlibcap-4eadce8d403a95aecaa2cd4dbfc73e81eab86d00.tar.gz
Man page cleanup - consistent style.
Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
-rw-r--r--doc/cap_clear.334
-rw-r--r--doc/cap_copy_ext.334
-rw-r--r--doc/cap_from_text.354
-rw-r--r--doc/cap_get_file.330
-rw-r--r--doc/cap_get_proc.335
-rw-r--r--doc/cap_init.322
6 files changed, 106 insertions, 103 deletions
diff --git a/doc/cap_clear.3 b/doc/cap_clear.3
index 68dd521..9ca243a 100644
--- a/doc/cap_clear.3
+++ b/doc/cap_clear.3
@@ -14,18 +14,18 @@ cap_clear, cap_get_flag, cap_set_flag \- capability data object manipulation
.SH USAGE
.B cc ... -lcap
.SH DESCRIPTION
-.B cap_clear
+.BR cap_clear ()
initializes the capability state in working storage identified by
.I cap_p
in such a way that all capability flags are cleared.
.PP
-.B cap_clear_flag
+.BR cap_clear_flag ()
resets, to
.BR CAP_CLEAR ,
all of the capabilities of the specific capability flag,
.IR flag .
.PP
-.B cap_get_flag
+.BR cap_get_flag ()
obtains the current value of the capability flag,
.IR flag ,
of the capability,
@@ -35,7 +35,7 @@ from the capability state identified by
and places it in the location pointed to by
.IR value_p .
.PP
-.B cap_set_flag
+.BR cap_set_flag ()
sets the flag,
.IR flag ,
of each capability in the array
@@ -50,43 +50,43 @@ is used to specify the number of capabilities in the array,
.IR caps .
.PP
A
-.B cap_value_t
+.I cap_value_t
can identify any capability, such as
.BR CAP_CHOWN .
A
-.B cap_flag_t
+.I cap_flag_t
can be set to
.BR CAP_EFFECTIVE ,
.B CAP_INHERITABLE
or
.BR CAP_PERMITTED .
A
-.B cap_flag_value_t
+.I cap_flag_value_t
can be
.B CAP_CLEAR
(0) or
.B CAP_SET
(1).
.SH "RETURN VALUE"
-.BR cap_clear ,
-.BR cap_clear_flag ,
-.B cap_get_flag
+.BR cap_clear (),
+.BR cap_clear_flag (),
+.BR cap_get_flag ()
and
.B cap_set_flag
return zero on success, and \-1 on failure.
.PP
On failure,
-.BR errno (3)
+.I errno
is set to
.BR EINVAL ,
indicating that one of the arguments is invalid.
.SH "CONFORMING TO"
These functions are as per the defunct POSIX.1e. spec.
-.B cap_clear_flag
+.BR cap_clear_flag ()
is an extension.
.SH "SEE ALSO"
-.IR cap_copy_ext (3),
-.IR cap_from_text (3),
-.IR cap_get_file (3),
-.IR cap_get_proc (3),
-.IR cap_init (3)
+.BR cap_copy_ext (3),
+.BR cap_from_text (3),
+.BR cap_get_file (3),
+.BR cap_get_proc (3),
+.BR cap_init (3)
diff --git a/doc/cap_copy_ext.3 b/doc/cap_copy_ext.3
index 1be1b2c..4fc7fc6 100644
--- a/doc/cap_copy_ext.3
+++ b/doc/cap_copy_ext.3
@@ -22,7 +22,7 @@ persistent representation of a capability state in user-managed space. The
internal representation is managed by the capability functions in working
storage.
.PP
-.B cap_size
+.BR cap_size ()
returns the total length (in bytes) that the capability state in working
storage identified by
.I cap_p
@@ -30,27 +30,27 @@ would require when converted by
.BR cap_copy_ext .
This function is used primarily to determine the amount of buffer space that
must be provided to the
-.B cap_copy_ext
+.BR cap_copy_ext ()
function in order to hold the capability data record created from
.IR cap_p .
.PP
-.B cap_copy_ext
+.BR cap_copy_ext ()
copies a capability state in working storage, identified by
.IR cap_p ,
from system managed space to user-managed space (pointed to by
.IR ext_p )
and returns the length of the resulting data record. The size parameter
represents the maximum size, in bytes, of the resulting data record. The
-.B cap_copy_ext
+.BR cap_copy_ext ()
function will do any conversions necessary to convert the capability state
from the undefined internal format to an exportable, contiguous, persistent
data record. It is the responsibility of the user to allocate a buffer large
enough to hold the copied data. The buffer length required to hold the copied
data may be obtained by a call to the
-.B cap_size
+.BR cap_size ()
function.
.PP
-.B cap_copy_int
+.BR cap_copy_int ()
copies a capability state from a capability data record in user-managed
space to a new capability state in working storage, allocating any
memory necessary, and returning a pointer to the newly created capability
@@ -63,30 +63,30 @@ copied into internal format, the object can be manipulated by the capability
state manipulation functions. Note that the record pointed to by
.I ext_p
must have been obtained from a previous, successful call to
-.B cap_copy_ext
+.BR cap_copy_ext ()
for this function to work successfully. The caller should free any
releasable memory, when the capability state in working storage is no
longer required, by calling
-.B cap_free
+.BR cap_free ()
with the
.I cap_t
as an argument.
.SH "RETURN VALUE"
-.B cap_size
+.BR cap_size ()
returns the length required to hold a capability data record on success,
and -1 on failure.
.PP
-.B cap_copy_ext
+.BR cap_copy_ext ()
returns the number of bytes placed in the user managed space pointed to by
.I ext_p
on success, and -1 on failure.
.PP
-.B cap_copy_int
+.BR cap_copy_int ()
returns a pointer to the newly created capability state in working storage
on success, and NULL on failure.
.PP
On failure,
-.BR errno (3)
+.BR errno
is set to
.BR EINVAL ,
.BR ENOMEM ,
@@ -95,8 +95,8 @@ or
.SH "CONFORMING TO"
These functions are specified by POSIX.1e.
.SH "SEE ALSO"
-.IR cap_clear (3),
-.IR cap_from_text (3),
-.IR cap_get_file (3),
-.IR cap_get_proc (3),
-.IR cap_init (3)
+.BR cap_clear (3),
+.BR cap_from_text (3),
+.BR cap_get_file (3),
+.BR cap_get_proc (3),
+.BR cap_init (3)
diff --git a/doc/cap_from_text.3 b/doc/cap_from_text.3
index d27dfcb..372bb72 100644
--- a/doc/cap_from_text.3
+++ b/doc/cap_from_text.3
@@ -23,7 +23,7 @@ into a textual one. The internal representation is managed by the capability
functions in working storage. The textual representation is a structured,
human-readable, string suitable for display.
.PP
-.B cap_from_text
+.BR cap_from_text ()
allocates and initializes a capability state in working storage. It
then sets the contents of this newly-created capability state to the
state represented by a human-readable, nul terminated, character
@@ -32,7 +32,7 @@ string pointed to by
It returns a pointer to the newly created capability state. The
caller should free any releasable memory, when the capability state in working
storage is no longer required, by calling
-.B cap_free
+.BR cap_free ()
with
.I cap_t
as an argument. The function returns an error if it cannot parse the
@@ -43,7 +43,7 @@ or does not recognize any
or flag character as valid. The function also returns an error if any flag
is both set and cleared within a single clause.
.PP
-.B cap_to_text
+.BR cap_to_text ()
converts the capability state in working storage identified by
.I cap_p
into a null terminated human-readable string. This function allocates
@@ -60,28 +60,28 @@ The capability state in working storage, identified by
is completely represented in the character string. The caller should
free any releasable memory, when the capability state in working
storage is no longer required, by calling
-.B cap_free
+.BR cap_free ()
with the returned string pointer as an argument.
.PP
-.B cap_from_name
+.BR cap_from_name ()
converts a text representation of a capability, such as "cap_chown",
-to its numerical representation (
-.B CAP_CHOWN=0
-). Writing the decoded value into
-.B *cap_p.
+to its numerical representation
+.RB ( CAP_CHOWN=0 ).
+Writing the decoded value into
+.IR *cap_p .
If
-.B cap_p
+.I cap_p
is
.B NULL
no result is written, but the return code of the function indicates
whether or not the specified capability can be represented by the
library.
.PP
-.B cap_to_text
+.BR cap_to_text ()
converts a capability index value,
-.B cap ,
+.IR cap ,
to a libcap allocated textual string. This string should be deallocated with
-.B "cap_free" .
+.BR cap_free ().
.SH "TEXTUAL REPRESENTATION"
A textual representation of capability sets consists of one or more
whitespace-separated
@@ -145,32 +145,32 @@ will raise the override-file-ownership capability in the Permitted
capability set and lower this Inheritable capability;
"cap_fowner+pe-i" and "cap_fowner=+pe" are equivalent.
.SH "RETURN VALUE"
-.B "cap_from_text" ,
-.B cap_to_text
+.BR cap_from_text (),
+.BR cap_to_text ()
and
-.B cap_to_text
+.BR cap_to_text ()
return a non-NULL value on success, and NULL on failure.
-.B cap_from_text
+.BR cap_from_text ()
returns 0 for success, and -1 on failure (unknown capability).
.PP
On failure,
-.BR errno (3)
+.I errno
is set to
.BR EINVAL ,
or
.BR ENOMEM .
.SH "CONFORMING TO"
-.B cap_from_text
+.BR cap_from_text ()
and
-.B cap_to_text
+.BR cap_to_text ()
are specified by the withdrawn POSIX.1e draft.
-.B cap_from_name
+.BR cap_from_name ()
and
-.B cap_to_name
+.BR cap_to_name ()
are a Linux extension.
.SH "SEE ALSO"
-.IR cap_clear (3),
-.IR cap_copy_ext (3),
-.IR cap_get_file (3),
-.IR cap_get_proc (3),
-.IR cap_init (3)
+.BR cap_clear (3),
+.BR cap_copy_ext (3),
+.BR cap_get_file (3),
+.BR cap_get_proc (3),
+.BR cap_init (3)
diff --git a/doc/cap_get_file.3 b/doc/cap_get_file.3
index c9b727c..e9c3b98 100644
--- a/doc/cap_get_file.3
+++ b/doc/cap_get_file.3
@@ -23,9 +23,9 @@ cap_get_file, cap_set_file, cap_get_fd, cap_set_fd \- capability manipulation on
.br
.B cc ... -lcap
.SH DESCRIPTION
-.B cap_get_file
+.BR cap_get_file ()
and
-.B cap_get_fd
+.BR cap_get_fd ()
allocate a capability state in working storage and set it to represent the
capability state of the pathname pointed to by
.I path_p
@@ -36,14 +36,14 @@ state. The effects of reading the capability state from any file
other than a regular file is undefined. The caller should free any
releasable memory, when the capability state in working storage is no
longer required, by calling
-.B cap_free
+.BR cap_free ()
with the used
.I cap_t
as an argument.
.PP
-.B cap_set_file
+.BR cap_set_file ()
and
-.B cap_set_fd
+.BR cap_set_fd ()
set the values for all capability flags for all capabilities for the pathname
pointed to by
.I path_p
@@ -67,18 +67,18 @@ the file owner or the calling process must have the effective flag of the
capability set. The effects of writing the capability state to any file
type other than a regular file are undefined.
.SH "RETURN VALUE"
-.B cap_get_file
+.BR cap_get_file ()
and
-.B cap_get_fd
+.BR cap_get_fd ()
return a non-NULL value on success, and NULL on failure.
.PP
-.B cap_set_file
+.BR cap_set_file ()
and
-.B cap_set_fd
+.BR cap_set_fd ()
return zero on success, and \-1 on failure.
.PP
On failure,
-.BR errno (3)
+.I errno
is set to
.BR EACCES ,
.BR EBADFD ,
@@ -92,8 +92,8 @@ or
.SH "CONFORMING TO"
These functions are specified by POSIX.1e.
.SH "SEE ALSO"
-.IR cap_clear (3),
-.IR cap_copy_ext (3),
-.IR cap_from_text (3),
-.IR cap_get_proc (3),
-.IR cap_init (3)
+.BR cap_clear (3),
+.BR cap_copy_ext (3),
+.BR cap_from_text (3),
+.BR cap_get_proc (3),
+.BR cap_init (3)
diff --git a/doc/cap_get_proc.3 b/doc/cap_get_proc.3
index da27d29..3be2efc 100644
--- a/doc/cap_get_proc.3
+++ b/doc/cap_get_proc.3
@@ -27,18 +27,18 @@ arbitrary processes
.br
.B cc ... -lcap
.SH DESCRIPTION
-.B cap_get_proc
+.BR cap_get_proc ()
allocates a capability state in working storage, sets its state to
that of the calling process, and returns a pointer to this newly
created capability state. The caller should free any releasable
memory, when the capability state in working storage is no longer
required, by calling
-.B cap_free
+.BR cap_free ()
with the
.I cap_t
as an argument.
.PP
-.B cap_set_proc
+.BR cap_set_proc ()
sets the values for all capability flags for all capabilities with the
capability state identified by
.IR cap_p .
@@ -51,7 +51,7 @@ is set for any capability not currently permitted for the calling process,
the function will fail, and the capability state of the process will remain
unchanged.
.PP
-.B capgetp
+.BR capgetp ()
fills an existing
.BR cap_d ,
see
@@ -62,7 +62,7 @@ This information can also be obtained from the
.B /proc/<pid>/status
file.
.PP
-.B capsetp
+.BR capsetp ()
attempts to set the capabilities of some other process(es),
.IR pid .
If
@@ -81,28 +81,31 @@ target process(es) are those contained in
.IR cap_d .
.SH "RETURN VALUE"
-.B cap_get_proc
+.BR cap_get_proc ()
returns a non-NULL value on success, and NULL on failure.
.PP
-.BR cap_set_proc ", " capgetp " and " capsetp
+.BR cap_set_proc (),
+.BR capgetp ()
+and
+.BR capsetp ()
return zero for success, and \-1 on failure.
.PP
On failure,
-.BR errno (3)
+.I errno
is set to
.BR EINVAL ,
.BR EPERM,
or
.BR ENOMEM .
.SH "CONFORMING TO"
-.B cap_set_proc
+.BR cap_set_proc ()
and
-.B cap_get_proc
+.BR cap_get_proc ()
are functions specified in the draft for POSIX.1e.
.SH "NOTES"
The function
-.B capsetp
+.BR capsetp ()
should be used with care. It exists, primarily, to overcome a lack of
support for capabilities in any of the filesystems supported by Linux.
The semantics of this function may change as it is better understood.
@@ -115,8 +118,8 @@ kflushd and kswapd). You will need to recompile the kernel to modify
this default.
.SH "SEE ALSO"
-.IR cap_clear (3),
-.IR cap_copy_ext (3),
-.IR cap_from_text (3),
-.IR cap_get_file (3),
-.IR cap_init (3)
+.BR cap_clear (3),
+.BR cap_copy_ext (3),
+.BR cap_from_text (3),
+.BR cap_get_file (3),
+.BR cap_init (3)
diff --git a/doc/cap_init.3 b/doc/cap_init.3
index f7a6649..b5db87c 100644
--- a/doc/cap_init.3
+++ b/doc/cap_init.3
@@ -45,10 +45,10 @@ argument may identify either a
entity, or a
.I char *
entity allocated by the
-.B cap_to_text
+.BR cap_to_text ()
function.
.PP
-.B cap_dup
+.BR cap_dup ()
returns a duplicate capability state in working storage given by the
source object
.IR cap_p ,
@@ -56,16 +56,16 @@ allocating any memory necessary, and returning a
pointer to the newly created capability state. Once duplicated, no
operation on either capability state affects the other in any way.
.SH "RETURN VALUE"
-.B cap_init
+.BR cap_init ()
and
-.B cap_dup
+.BR cap_dup ()
return a non-NULL value on success, and NULL on failure.
.PP
-.B cap_free
+.BR cap_free ()
returns zero on success, and \-1 on failure.
.PP
On failure,
-.BR errno (3)
+.I errno
is set to
.BR EINVAL ,
or
@@ -73,8 +73,8 @@ or
.SH "CONFORMING TO"
These functions are specified by POSIX.1e.
.SH "SEE ALSO"
-.IR cap_clear (3),
-.IR cap_copy_ext (3),
-.IR cap_from_text (3),
-.IR cap_get_file (3),
-.IR cap_get_proc (3)
+.BR cap_clear (3),
+.BR cap_copy_ext (3),
+.BR cap_from_text (3),
+.BR cap_get_file (3),
+.BR cap_get_proc (3)