Syntax-fixes-for-man-pages.patch 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437
  1. From: Christian Kastner <ckk@debian.org>
  2. Date: Sat, 26 Jul 2014 18:32:55 +0200
  3. Subject: Syntax fixes for man pages
  4. Hyphens used as minus signs must be escaped.
  5. Last-Update: 2015-10-02
  6. ---
  7. doc/cap_clear.3 | 2 +-
  8. doc/cap_copy_ext.3 | 6 +++---
  9. doc/cap_from_text.3 | 18 +++++++++---------
  10. doc/cap_get_file.3 | 2 +-
  11. doc/cap_get_proc.3 | 14 +++++++-------
  12. doc/cap_init.3 | 2 +-
  13. doc/capsh.1 | 42 +++++++++++++++++++++---------------------
  14. doc/getcap.8 | 8 ++++----
  15. doc/libcap.3 | 2 +-
  16. doc/setcap.8 | 12 ++++++------
  17. 10 files changed, 54 insertions(+), 54 deletions(-)
  18. diff --git a/doc/cap_clear.3 b/doc/cap_clear.3
  19. index 48f5cc0..73aac61 100644
  20. --- a/doc/cap_clear.3
  21. +++ b/doc/cap_clear.3
  22. @@ -18,7 +18,7 @@ cap_clear, cap_clear_flag, cap_get_flag, cap_set_flag, cap_compare \- capability
  23. .sp
  24. .BI "int cap_compare(cap_t " cap_a ", cap_t " cap_b ");"
  25. .sp
  26. -Link with \fI-lcap\fP.
  27. +Link with \fI\-lcap\fP.
  28. .fi
  29. .SH DESCRIPTION
  30. These functions work on a capability state held in working storage.
  31. diff --git a/doc/cap_copy_ext.3 b/doc/cap_copy_ext.3
  32. index 61d9381..18c2fe6 100644
  33. --- a/doc/cap_copy_ext.3
  34. +++ b/doc/cap_copy_ext.3
  35. @@ -11,7 +11,7 @@ external representation translation
  36. .sp
  37. .BI "cap_t cap_copy_int(const void *" ext_p );
  38. .sp
  39. -Link with \fI-lcap\fP.
  40. +Link with \fI\-lcap\fP.
  41. .SH DESCRIPTION
  42. These functions translate between internal and external
  43. representations of a capability state. The external representation is
  44. @@ -74,12 +74,12 @@ as an argument.
  45. .SH "RETURN VALUE"
  46. .BR cap_size ()
  47. returns the length required to hold a capability data record on success,
  48. -and -1 on failure.
  49. +and \-1 on failure.
  50. .PP
  51. .BR cap_copy_ext ()
  52. returns the number of bytes placed in the user managed space pointed to by
  53. .I ext_p
  54. -on success, and -1 on failure.
  55. +on success, and \-1 on failure.
  56. .PP
  57. .BR cap_copy_int ()
  58. returns a pointer to the newly created capability state in working storage
  59. diff --git a/doc/cap_from_text.3 b/doc/cap_from_text.3
  60. index ccf7d95..bb24af2 100644
  61. --- a/doc/cap_from_text.3
  62. +++ b/doc/cap_from_text.3
  63. @@ -16,7 +16,7 @@ state textual representation translation
  64. .sp
  65. .BI "char *cap_to_name(cap_value_t " cap );
  66. .sp
  67. -Link with \fI-lcap\fP.
  68. +Link with \fI\-lcap\fP.
  69. .SH DESCRIPTION
  70. These functions translate a capability state between
  71. an internal representation and a textual one.
  72. @@ -100,7 +100,7 @@ followed by an
  73. An action-list consists of a sequence of
  74. .I operator flag
  75. pairs. Legal operators are:
  76. -.RB ` = "', '" + "', and `" - "'."
  77. +.RB ` = "', '" + "', and `" \- "'."
  78. Legal flags are:
  79. .RB ` e "', `" i "', and `" p "'."
  80. These flags are case-sensitive and specify the Effective, Inheritable
  81. @@ -136,15 +136,15 @@ refer to `all' capabilities. For example, the following three
  82. clauses are equivalent to each other (and indicate a completely empty
  83. capability set): "all="; "="; "cap_chown,<every-other-capability>=".
  84. .PP
  85. -The operators, `+' and `-' both require an explicit preceding
  86. +The operators, `+' and `\-' both require an explicit preceding
  87. capability list and one or more explicit trailing flags. The `+'
  88. operator will raise all of the listed capabilities in the flagged
  89. -capability sets. The `-' operator will lower all of the listed
  90. +capability sets. The `\-' operator will lower all of the listed
  91. capabilities in the flagged capability sets. For example:
  92. -"all+p" will raise all of the Permitted capabilities; "cap_fowner+p-i"
  93. +"all+p" will raise all of the Permitted capabilities; "cap_fowner+p\-i"
  94. will raise the override-file-ownership capability in the Permitted
  95. capability set and lower this Inheritable capability;
  96. -"cap_fowner+pe-i" and "cap_fowner=+pe" are equivalent.
  97. +"cap_fowner+pe\-i" and "cap_fowner=+pe" are equivalent.
  98. .SH "RETURN VALUE"
  99. .BR cap_from_text (),
  100. .BR cap_to_text ()
  101. @@ -152,7 +152,7 @@ and
  102. .BR cap_to_name ()
  103. return a non-NULL value on success, and NULL on failure.
  104. .BR cap_from_name ()
  105. -returns 0 for success, and -1 on failure (unknown capability).
  106. +returns 0 for success, and \-1 on failure (unknown capability).
  107. .PP
  108. On failure,
  109. .I errno
  110. @@ -180,8 +180,8 @@ The following shell session shows a some example runs:
  111. $ ./a.out "cap_chown=p cap_chown+e"
  112. caps_to_text() returned "= cap_chown+ep"
  113. -$ ./a.out "all=pe cap_chown-e cap_kill-pe"
  114. -caps_to_text() returned "=ep cap_chown-e cap_kill-ep"
  115. +$ ./a.out "all=pe cap_chown\-e cap_kill\-pe"
  116. +caps_to_text() returned "=ep cap_chown\-e cap_kill\-ep"
  117. .fi
  118. .in
  119. diff --git a/doc/cap_get_file.3 b/doc/cap_get_file.3
  120. index 107b6d1..fa23ff6 100644
  121. --- a/doc/cap_get_file.3
  122. +++ b/doc/cap_get_file.3
  123. @@ -18,7 +18,7 @@ manipulation on files
  124. .sp
  125. .BI "int cap_set_fd(int " fd ", cap_t " caps );
  126. .sp
  127. -Link with \fI-lcap\fP.
  128. +Link with \fI\-lcap\fP.
  129. .SH DESCRIPTION
  130. .BR cap_get_file ()
  131. and
  132. diff --git a/doc/cap_get_proc.3 b/doc/cap_get_proc.3
  133. index be28362..7e495f8 100644
  134. --- a/doc/cap_get_proc.3
  135. +++ b/doc/cap_get_proc.3
  136. @@ -22,7 +22,7 @@ capability manipulation on processes
  137. .sp
  138. .BI "cap_t cap_get_pid(pid_t " pid );
  139. .sp
  140. -Link with \fI-lcap\fP.
  141. +Link with \fI\-lcap\fP.
  142. .SH DESCRIPTION
  143. .BR cap_get_proc ()
  144. allocates a capability state in working storage, sets its state to
  145. @@ -89,7 +89,7 @@ return a non-NULL value on success, and NULL on failure.
  146. .PP
  147. The function
  148. .BR cap_get_bound ()
  149. -returns -1 if the requested capability is unknown, otherwise the
  150. +returns \-1 if the requested capability is unknown, otherwise the
  151. return value reflects the current state of that capability in the
  152. prevailing bounding set. Note, a macro function,
  153. .PP
  154. @@ -136,11 +136,11 @@ attempts to set the capabilities of some other process(es),
  155. If
  156. .I pid
  157. is positive it refers to a specific process; if it is zero, it refers
  158. -to the current process; -1 refers to all processes other than the
  159. +to the current process; \-1 refers to all processes other than the
  160. current process and process '1' (typically
  161. .BR init (8));
  162. other negative values refer to the
  163. -.I -pid
  164. +.I \-pid
  165. process group. In order to use this function, the kernel must support
  166. it and the current process must have
  167. .B CAP_SETPCAP
  168. @@ -185,13 +185,13 @@ effective capabilities for the caller:
  169. cap_list[0] = CAP_FOWNER;
  170. cap_list[1] = CAP_SETFCAP;
  171. - if (cap_set_flag(caps, CAP_EFFECTIVE, 2, cap_list, CAP_SET) == -1)
  172. + if (cap_set_flag(caps, CAP_EFFECTIVE, 2, cap_list, CAP_SET) == \-1)
  173. /* handle error */;
  174. - if (cap_set_proc(caps) == -1)
  175. + if (cap_set_proc(caps) == \-1)
  176. /* handle error */;
  177. - if (cap_free(caps) == -1)
  178. + if (cap_free(caps) == \-1)
  179. /* handle error */;
  180. .fi
  181. .SH "SEE ALSO"
  182. diff --git a/doc/cap_init.3 b/doc/cap_init.3
  183. index f198f63..96cfea6 100644
  184. --- a/doc/cap_init.3
  185. +++ b/doc/cap_init.3
  186. @@ -13,7 +13,7 @@ cap_init, cap_free, cap_dup \- capability data object storage management
  187. .sp
  188. .BI "cap_t cap_dup(cap_t " cap_p );
  189. .sp
  190. -Link with \fI-lcap\fP.
  191. +Link with \fI\-lcap\fP.
  192. .SH DESCRIPTION
  193. The capabilities associated with a file or process are never edited
  194. directly. Instead, working storage is allocated to contain a
  195. diff --git a/doc/capsh.1 b/doc/capsh.1
  196. index e68df2c..d0045ed 100644
  197. --- a/doc/capsh.1
  198. +++ b/doc/capsh.1
  199. @@ -16,14 +16,14 @@ debugging features useful for summarizing capability state.
  200. The tool takes a number of optional arguments, acting on them in the
  201. order they are provided. They are as follows:
  202. .TP 22
  203. -.B --print
  204. +.B \-\-print
  205. Display prevailing capability and related state.
  206. .TP
  207. -.BI -- " [args]"
  208. +.BI \-\- " [args]"
  209. Execute
  210. .B /bin/bash
  211. with trailing arguments. Note, you can use
  212. -.B -c 'command to execute'
  213. +.B \-c 'command to execute'
  214. for specific commands.
  215. .TP
  216. .B ==
  217. @@ -33,7 +33,7 @@ again with remaining arguments. Useful for testing
  218. .BR exec ()
  219. behavior.
  220. .TP
  221. -.BI --caps= cap-set
  222. +.BI \-\-caps= cap-set
  223. Set the prevailing process capabilities to those specified by
  224. .IR cap-set .
  225. Where
  226. @@ -41,9 +41,9 @@ Where
  227. is a text-representation of capability state as per
  228. .BR cap_from_text (3).
  229. .TP
  230. -.BI --drop= cap-list
  231. +.BI \-\-drop= cap-list
  232. Remove the listed capabilities from the prevailing bounding set. The
  233. -capabilites are a comma separated list of capabilities as recognized
  234. +capabilities are a comma separated list of capabilities as recognized
  235. by the
  236. .BR cap_from_name (3)
  237. function. Use of this feature requires that the capsh program is
  238. @@ -51,7 +51,7 @@ operating with
  239. .B CAP_SETPCAP
  240. in its effective set.
  241. .TP
  242. -.BI --inh= cap-list
  243. +.BI \-\-inh= cap-list
  244. Set the inheritable set of capabilities for the current process to
  245. equal those provided in the comma separated list. For this action to
  246. succeed, the prevailing process should already have each of these
  247. @@ -60,7 +60,7 @@ capability sets, or the capsh program is operating with
  248. .B CAP_SETPCAP
  249. in its effective set.
  250. .TP
  251. -.BI --user= username
  252. +.BI \-\-user= username
  253. Assume the identity of the named user. That is, look up the user's
  254. .IR uid " and " gid
  255. with
  256. @@ -69,7 +69,7 @@ and their group memberships with
  257. .BR getgrouplist (3)
  258. and set them all.
  259. .TP
  260. -.BI --uid= id
  261. +.BI \-\-uid= id
  262. Force all
  263. .B uid
  264. values to equal
  265. @@ -78,7 +78,7 @@ using the
  266. .BR setuid (2)
  267. system call.
  268. .TP
  269. -.BI --gid= <id>
  270. +.BI \-\-gid= <id>
  271. Force all
  272. .B gid
  273. values to equal
  274. @@ -87,13 +87,13 @@ using the
  275. .BR setgid (2)
  276. system call.
  277. .TP
  278. -.BI --groups= <id-list>
  279. +.BI \-\-groups= <id-list>
  280. Set the supplementary groups to the numerical list provided. The
  281. groups are set with the
  282. .BR setgroups (2)
  283. system call.
  284. .TP
  285. -.BI --keep= <0|1>
  286. +.BI \-\-keep= <0|1>
  287. In a non-pure capability mode, the kernel provides liberal privilege
  288. to the super-user. However, it is normally the case that when the
  289. super-user changes
  290. @@ -113,13 +113,13 @@ the current process. In all cases,
  291. is deactivated when an
  292. .BR exec ()
  293. is performed. See
  294. -.B --secbits
  295. +.B \-\-secbits
  296. for ways to disable this feature.
  297. .TP
  298. -.BI --secbits= N
  299. +.BI \-\-secbits= N
  300. XXX - need to document this feature.
  301. .TP
  302. -.BI --chroot= path
  303. +.BI \-\-chroot= path
  304. Execute the
  305. .BR chroot (2)
  306. system call with the new root-directory (/) equal to
  307. @@ -128,11 +128,11 @@ This operation requires
  308. .B CAP_SYS_CHROOT
  309. to be in effect.
  310. .TP
  311. -.BI --forkfor= sec
  312. +.BI \-\-forkfor= sec
  313. .TP
  314. -.BI --killit= sig
  315. +.BI \-\-killit= sig
  316. .TP
  317. -.BI --decode= N
  318. +.BI \-\-decode= N
  319. This is a convenience feature. If you look at
  320. .B /proc/1/status
  321. there are some capability related fields of the following form:
  322. @@ -146,15 +146,15 @@ This option provides a quick way to decode a capability vector
  323. represented in this form. For example, the missing capability from
  324. this effective set is 0x0100. By running:
  325. - capsh --decode=0x0100
  326. + capsh \-\-decode=0x0100
  327. we observe that the missing capability is:
  328. .BR cap_setpcap .
  329. .TP
  330. -.BI --supports= xxx
  331. +.BI \-\-supports= xxx
  332. As the kernel evolves, more capabilities are added. This option can be used
  333. to verify the existence of a capability on the system. For example,
  334. -.BI --supports= cap_syslog
  335. +.BI \-\-supports= cap_syslog
  336. will cause capsh to promptly exit with a status of 1 when run on
  337. kernel 2.6.27. However, when run on kernel 2.6.38 it will silently
  338. succeed.
  339. diff --git a/doc/getcap.8 b/doc/getcap.8
  340. index 1d5ac0f..70e441d 100644
  341. --- a/doc/getcap.8
  342. +++ b/doc/getcap.8
  343. @@ -6,19 +6,19 @@
  344. .SH NAME
  345. getcap \- examine file capabilities
  346. .SH SYNOPSIS
  347. -\fBgetcap\fP [-v] [-r] [-h] \fIfilename\fP [ ... ]
  348. +\fBgetcap\fP [\-v] [\-r] [\-h] \fIfilename\fP [ ... ]
  349. .SH DESCRIPTION
  350. .B getcap
  351. displays the name and capabilities of each specified
  352. .SH OPTIONS
  353. .TP 4
  354. -.B -r
  355. +.B \-r
  356. enables recursive search.
  357. .TP 4
  358. -.B -v
  359. +.B \-v
  360. enables to display all searched entries, even if it has no file-capabilities.
  361. .TP 4
  362. -.B -h
  363. +.B \-h
  364. prints quick usage.
  365. .TP 4
  366. .IR filename
  367. diff --git a/doc/libcap.3 b/doc/libcap.3
  368. index 0e76b4e..7df0a0d 100644
  369. --- a/doc/libcap.3
  370. +++ b/doc/libcap.3
  371. @@ -56,7 +56,7 @@ cap_get_pid, cap_dup \- capability data object manipulation
  372. .sp
  373. .BI "cap_t cap_dup(cap_t " cap_p );
  374. .sp
  375. -Link with \fI-lcap\fP.
  376. +Link with \fI\-lcap\fP.
  377. .fi
  378. .SH DESCRIPTION
  379. These functions work on a capability state held in working storage.
  380. diff --git a/doc/setcap.8 b/doc/setcap.8
  381. index 9344ba5..559f3ec 100644
  382. --- a/doc/setcap.8
  383. +++ b/doc/setcap.8
  384. @@ -5,10 +5,10 @@
  385. .SH NAME
  386. setcap \- set file capabilities
  387. .SH SYNOPSIS
  388. -\fBsetcap\fP [-q] [-v] (\fIcapabilities|-|-r) filename\fP [ ... \fIcapabilitiesN\fP \fIfileN\fP ]
  389. +\fBsetcap\fP [\-q] [\-v] (\fIcapabilities|\-|\-r) filename\fP [ ... \fIcapabilitiesN\fP \fIfileN\fP ]
  390. .SH DESCRIPTION
  391. In the absence of the
  392. -.B -v
  393. +.B \-v
  394. (verify) option
  395. .B setcap
  396. sets the capabilities of each specified
  397. @@ -16,7 +16,7 @@ sets the capabilities of each specified
  398. to the
  399. .I capabilities
  400. specified. The
  401. -.B -v
  402. +.B \-v
  403. option is used to verify that the specified capabilities are currently
  404. associated with the file.
  405. .PP
  406. @@ -26,17 +26,17 @@ are specified in the form described in
  407. .IR cap_from_text (3).
  408. .PP
  409. The special capability string,
  410. -.BR '-' ,
  411. +.BR '\-' ,
  412. can be used to indicate that capabilities are read from the standard
  413. input. In such cases, the capability set is terminated with a blank
  414. line.
  415. .PP
  416. The special capability string,
  417. -.BR '-r' ,
  418. +.BR '\-r' ,
  419. is used to remove a capability set from a file.
  420. .PP
  421. The
  422. -.B -q
  423. +.B \-q
  424. flag is used to make the program less verbose in its output.
  425. .SH "EXIT CODE"
  426. The