libcap.xml 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  4. <!ENTITY % general-entities SYSTEM "../general.ent">
  5. %general-entities;
  6. ]>
  7. <sect1 id="ch-system-libcap" role="wrap">
  8. <?dbhtml filename="libcap.html"?>
  9. <sect1info condition="script">
  10. <productname>libcap</productname>
  11. <productnumber>&libcap-version;</productnumber>
  12. <address>&libcap-url;</address>
  13. </sect1info>
  14. <title>Libcap-&libcap-version;</title>
  15. <indexterm zone="ch-system-libcap">
  16. <primary sortas="a-Libcap">Libcap</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <para>The Libcap package implements the user-space interfaces to the POSIX
  21. 1003.1e capabilities available in Linux kernels. These capabilities are a
  22. partitioning of the all powerful root privilege into a set of distinct
  23. privileges.</para>
  24. <segmentedlist>
  25. <segtitle>&buildtime;</segtitle>
  26. <segtitle>&diskspace;</segtitle>
  27. <seglistitem>
  28. <seg>&libcap-ch6-sbu;</seg>
  29. <seg>&libcap-ch6-du;</seg>
  30. </seglistitem>
  31. </segmentedlist>
  32. </sect2>
  33. <sect2 role="installation">
  34. <title>Installation of Libcap</title>
  35. <para>Prevent a static library from being installed:</para>
  36. <screen><userinput remap="pre">sed -i '/install.*STACAPLIBNAME/d' libcap/Makefile</userinput></screen>
  37. <para>Compile the package:</para>
  38. <screen><userinput remap="make">make lib=lib</userinput></screen>
  39. <variablelist>
  40. <title>The meaning of the make option:</title>
  41. <varlistentry>
  42. <term><parameter>lib=lib</parameter></term>
  43. <listitem>
  44. <para>This parameter sets the library directory to
  45. <filename>/lib</filename> rather than
  46. <filename>/lib64</filename> on x86_64. It has no effect on
  47. x86.</para>
  48. </listitem>
  49. </varlistentry>
  50. </variablelist>
  51. <para>To test the results, issue:</para>
  52. <screen><userinput remap="test">make test</userinput></screen>
  53. <para>Install the package and do some cleanup:</para>
  54. <screen><userinput remap="install">make lib=lib install
  55. chmod -v 755 /lib/libcap.so.&libcap-version;
  56. mv -v /lib/libpsx.a /usr/lib
  57. rm -v /lib/libcap.so
  58. ln -sfv ../../lib/libcap.so.2 /usr/lib/libcap.so</userinput></screen>
  59. </sect2>
  60. <sect2 arch="ml_32,ml_all" role="installation">
  61. <title>Installation of Libcap - 32-bit</title>
  62. <para>Clean previous build:</para>
  63. <screen><userinput remap="pre">make distclean</userinput></screen>
  64. <para>Compile the package:</para>
  65. <screen><userinput remap="make">make CC="gcc -m32 -march=i686"</userinput></screen>
  66. <para>Install the package:</para>
  67. <screen><userinput remap="install">make lib=lib32 prefix=$PWD/DESTDIR/usr -C libcap install
  68. cp -Rv DESTDIR/usr/lib32/* /usr/lib32
  69. chmod -v 755 /usr/lib32/libcap.so.&libcap-version;
  70. rm -rf DESTDIR</userinput></screen>
  71. </sect2>
  72. <sect2 arch="ml_x32,ml_all" role="installation">
  73. <title>Installation of Libcap - x32-bit</title>
  74. <para>Clean previous build:</para>
  75. <screen><userinput remap="pre">make distclean</userinput></screen>
  76. <para>Compile the package:</para>
  77. <screen><userinput remap="make">make CC="gcc -mx32"</userinput></screen>
  78. <para>Install the package:</para>
  79. <screen><userinput remap="install">make lib=libx32 prefix=$PWD/DESTDIR/usr -C libcap install
  80. cp -Rv DESTDIR/usr/libx32/* /usr/libx32
  81. chmod -v 755 /usr/libx32/libcap.so.&libcap-version;
  82. rm -rf DESTDIR</userinput></screen>
  83. </sect2>
  84. <sect2 id="contents-libcap" role="content">
  85. <title>Contents of Libcap</title>
  86. <segmentedlist>
  87. <segtitle>Installed programs</segtitle>
  88. <segtitle>Installed library</segtitle>
  89. <seglistitem>
  90. <seg>capsh, getcap, getpcaps, and setcap</seg>
  91. <seg>libcap.so and libpsx.a</seg>
  92. </seglistitem>
  93. </segmentedlist>
  94. <variablelist>
  95. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  96. <?dbfo list-presentation="list"?>
  97. <?dbhtml list-presentation="table"?>
  98. <varlistentry id="capsh">
  99. <term><command>capsh</command></term>
  100. <listitem>
  101. <para>A shell wrapper to explore and constrain capability support</para>
  102. <indexterm zone="ch-system-libcap capsh">
  103. <primary sortas="b-capsh">capsh</primary>
  104. </indexterm>
  105. </listitem>
  106. </varlistentry>
  107. <varlistentry id="getcap">
  108. <term><command>getcap</command></term>
  109. <listitem>
  110. <para>Examines file capabilities</para>
  111. <indexterm zone="ch-system-libcap getcap">
  112. <primary sortas="b-getcap">getcap</primary>
  113. </indexterm>
  114. </listitem>
  115. </varlistentry>
  116. <varlistentry id="getpcaps">
  117. <term><command>getpcaps</command></term>
  118. <listitem>
  119. <para>Displays the capabilities on the queried process(es)</para>
  120. <indexterm zone="ch-system-libcap getpcaps">
  121. <primary sortas="b-getpcaps">getpcaps</primary>
  122. </indexterm>
  123. </listitem>
  124. </varlistentry>
  125. <varlistentry id="setcap">
  126. <term><command>setcap</command></term>
  127. <listitem>
  128. <para>Sets file capabilities</para>
  129. <indexterm zone="ch-system-libcap setcap">
  130. <primary sortas="b-setcap">setcap</primary>
  131. </indexterm>
  132. </listitem>
  133. </varlistentry>
  134. <varlistentry id="libcap">
  135. <term><filename class="libraryfile">libcap</filename></term>
  136. <listitem>
  137. <para>Contains the library functions for manipulating POSIX 1003.1e
  138. capabilities</para>
  139. <indexterm zone="ch-system-libcap libcap">
  140. <primary sortas="c-libcap">libcap</primary>
  141. </indexterm>
  142. </listitem>
  143. </varlistentry>
  144. <varlistentry id="libpsx">
  145. <term><filename class="libraryfile">libpsx</filename></term>
  146. <listitem>
  147. <para>Contains functions to support POSIX semantics for syscalls
  148. associated with the pthread library</para>
  149. <indexterm zone="ch-system-libcap libpsx">
  150. <primary sortas="c-libpsx">libpsx</primary>
  151. </indexterm>
  152. </listitem>
  153. </varlistentry>
  154. </variablelist>
  155. </sect2>
  156. </sect1>