diff options
author | Andrew G. Morgan <morgan@kernel.org> | 2020-05-16 15:06:11 -0700 |
---|---|---|
committer | Andrew G. Morgan <morgan@kernel.org> | 2020-05-16 17:33:19 -0700 |
commit | d057eaf2e0d3ed440e1c48c38892f1cca6eb86a7 (patch) | |
tree | 734e305811e29197146cca3cc5b32a6b82ac4f96 | |
parent | 2e0db2fc58a2da02f318ef41bb481d58f4c4268f (diff) | |
download | libcap2-d057eaf2e0d3ed440e1c48c38892f1cca6eb86a7.tar.gz |
Markdown related fixes.
This is still a work in progress, but see the doc/mkmd.sh file for
how these could be made. The overall conversion is done via
https://github.com/mle86/man-to-md with some minor tweaks with sed.
Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
-rw-r--r-- | doc/cap_from_text.3 | 20 | ||||
-rw-r--r-- | doc/capsh.1 | 7 | ||||
-rwxr-xr-x | doc/mkmd.sh | 2 |
3 files changed, 15 insertions, 14 deletions
diff --git a/doc/cap_from_text.3 b/doc/cap_from_text.3 index bb24af2..d40ff03 100644 --- a/doc/cap_from_text.3 +++ b/doc/cap_from_text.3 @@ -6,16 +6,14 @@ cap_from_text, cap_to_text, cap_to_name, cap_from_name \- capability state textual representation translation .SH SYNOPSIS -.B #include <sys/capability.h> -.sp -.BI "cap_t cap_from_text(const char *" buf_p ); -.sp -.BI "char *cap_to_text(cap_t " caps ", ssize_t *" length_p ); -.sp -.BI "int cap_from_name(const char *" name ", cap_value_t *" cap_p ); -.sp -.BI "char *cap_to_name(cap_value_t " cap ); -.sp +.nf +#include <sys/capability.h> + +cap_t cap_from_text(const char* buf_p ); +char *cap_to_text(cap_t caps, ssize_t * length_p); +int cap_from_name(const char* name , cap_value_t* cap_p); +char *cap_to_name(cap_value_t cap); +.fi Link with \fI\-lcap\fP. .SH DESCRIPTION These functions translate a capability state between @@ -175,7 +173,6 @@ The example program below demonstrates the use of and .BR cap_to_text (). The following shell session shows a some example runs: -.in +4n .nf $ ./a.out "cap_chown=p cap_chown+e" @@ -184,7 +181,6 @@ $ ./a.out "all=pe cap_chown\-e cap_kill\-pe" caps_to_text() returned "=ep cap_chown\-e cap_kill\-ep" .fi -.in The source code of the program is as follows: .nf diff --git a/doc/capsh.1 b/doc/capsh.1 index 1720430..cd30dc3 100644 --- a/doc/capsh.1 +++ b/doc/capsh.1 @@ -196,18 +196,22 @@ program exits with status 1. This is a convenience feature. If you look at .B /proc/1/status there are some capability related fields of the following form: +.nf CapInh: 0000000000000000 CapPrm: ffffffffffffffff CapEff: fffffffffffffeff CapBnd: ffffffffffffffff +.fi This option provides a quick way to decode a capability vector represented in this form. For example, the missing capability from this effective set is 0x0100. By running: +.nf capsh \-\-decode=0x0100 +.fi we observe that the missing capability is: .BR cap_setpcap . .TP @@ -258,6 +262,7 @@ Please report bugs via: https://bugzilla.kernel.org/buglist.cgi?component=libcap&list_id=1047723&product=Tools&resolution=--- .SH "SEE ALSO" .BR libcap (3), -.BR getcap "(8), " setcap (8) +.BR getcap (8), +.BR setcap (8) and .BR capabilities (7). diff --git a/doc/mkmd.sh b/doc/mkmd.sh index 53ffcec..10a2048 100755 --- a/doc/mkmd.sh +++ b/doc/mkmd.sh @@ -37,7 +37,7 @@ function do_page () { return fi - man-to-md < "${m}" | sed -e 's/^\*\*\([^\*]\+\)\*\*(\([138]\+\))/[\1(\2)](\1-\2.md)/' > "${outdir}/${base}-${sect}.md" + man-to-md -f < "${m}" | sed -e 's/^\*\*\([^\*]\+\)\*\*(\([138]\+\))/[\1(\2)](\1-\2.md)/' > "${outdir}/${base}-${sect}.md" echo "* [${base}(${sect})](${base}-${sect}.md)" >> "${index}" } |