wpa_priv.sgml 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
  2. <refentry>
  3. <refmeta>
  4. <refentrytitle>wpa_priv</refentrytitle>
  5. <manvolnum>8</manvolnum>
  6. </refmeta>
  7. <refnamediv>
  8. <refname>wpa_priv</refname>
  9. <refpurpose>wpa_supplicant privilege separation helper</refpurpose>
  10. </refnamediv>
  11. <refsynopsisdiv>
  12. <cmdsynopsis>
  13. <command>wpa_priv</command>
  14. <arg>-c <replaceable>ctrl path</replaceable></arg>
  15. <arg>-Bdd</arg>
  16. <arg>-P <replaceable>pid file</replaceable></arg>
  17. <arg>driver:ifname <replaceable>[driver:ifname ...]</replaceable></arg>
  18. </cmdsynopsis>
  19. </refsynopsisdiv>
  20. <refsect1>
  21. <title>Overview</title>
  22. <para><command>wpa_priv</command> is a privilege separation helper that
  23. minimizes the size of <command>wpa_supplicant</command> code that needs
  24. to be run with root privileges.</para>
  25. <para>If enabled, privileged operations are done in the wpa_priv process
  26. while leaving rest of the code (e.g., EAP authentication and WPA
  27. handshakes) to operate in an unprivileged process (wpa_supplicant) that
  28. can be run as non-root user. Privilege separation restricts the effects
  29. of potential software errors by containing the majority of the code in an
  30. unprivileged process to avoid the possibility of a full system
  31. compromise.</para>
  32. <para><command>wpa_priv</command> needs to be run with network admin
  33. privileges (usually, root user). It opens a UNIX domain socket for each
  34. interface that is included on the command line; any other interface will
  35. be off limits for <command>wpa_supplicant</command> in this kind of
  36. configuration. After this, <command>wpa_supplicant</command> can be run as
  37. a non-root user (e.g., all standard users on a laptop or as a special
  38. non-privileged user account created just for this purpose to limit access
  39. to user files even further).</para>
  40. </refsect1>
  41. <refsect1>
  42. <title>Example configuration</title>
  43. <para>The following steps are an example of how to configure
  44. <command>wpa_priv</command> to allow users in the
  45. <emphasis>wpapriv</emphasis> group to communicate with
  46. <command>wpa_supplicant</command> with privilege separation:</para>
  47. <para>Create user group (e.g., wpapriv) and assign users that
  48. should be able to use wpa_supplicant into that group.</para>
  49. <para>Create /var/run/wpa_priv directory for UNIX domain sockets and
  50. control user access by setting it accessible only for the wpapriv
  51. group:</para>
  52. <blockquote><programlisting>
  53. mkdir /var/run/wpa_priv
  54. chown root:wpapriv /var/run/wpa_priv
  55. chmod 0750 /var/run/wpa_priv
  56. </programlisting></blockquote>
  57. <para>Start <command>wpa_priv</command> as root (e.g., from system
  58. startup scripts) with the enabled interfaces configured on the
  59. command line:</para>
  60. <blockquote><programlisting>
  61. wpa_priv -B -c /var/run/wpa_priv -P /var/run/wpa_priv.pid wext:wlan0
  62. </programlisting></blockquote>
  63. <para>Run <command>wpa_supplicant</command> as non-root with a user
  64. that is in the wpapriv group:</para>
  65. <blockquote><programlisting>
  66. wpa_supplicant -i ath0 -c wpa_supplicant.conf
  67. </programlisting></blockquote>
  68. </refsect1>
  69. <refsect1>
  70. <title>Command Arguments</title>
  71. <variablelist>
  72. <varlistentry>
  73. <term>-c ctrl path</term>
  74. <listitem><para>Specify the path to wpa_priv control directory
  75. (Default: /var/run/wpa_priv/).</para></listitem>
  76. </varlistentry>
  77. <varlistentry>
  78. <term>-B</term>
  79. <listitem><para>Run as a daemon in the background.</para></listitem>
  80. </varlistentry>
  81. <varlistentry>
  82. <term>-P file</term>
  83. <listitem><para>Set the location of the PID
  84. file.</para></listitem>
  85. </varlistentry>
  86. <varlistentry>
  87. <term>driver:ifname [driver:ifname ...]</term>
  88. <listitem><para>The &lt;driver&gt; string dictates which of the
  89. supported <command>wpa_supplicant</command> driver backends is to be
  90. used. To get a list of supported driver types see wpa_supplicant help
  91. (e.g, wpa_supplicant -h). The driver backend supported by most good
  92. drivers is <emphasis>wext</emphasis>.</para>
  93. <para>The &lt;ifname&gt; string specifies which network
  94. interface is to be managed by <command>wpa_supplicant</command>
  95. (e.g., wlan0 or ath0).</para>
  96. <para><command>wpa_priv</command> does not use the network interface
  97. before <command>wpa_supplicant</command> is started, so it is fine to
  98. include network interfaces that are not available at the time wpa_priv
  99. is started. wpa_priv can control multiple interfaces with one process,
  100. but it is also possible to run multiple <command>wpa_priv</command>
  101. processes at the same time, if desired.</para></listitem>
  102. </varlistentry>
  103. </variablelist>
  104. </refsect1>
  105. <refsect1>
  106. <title>See Also</title>
  107. <para>
  108. <citerefentry>
  109. <refentrytitle>wpa_supplicant</refentrytitle>
  110. <manvolnum>8</manvolnum>
  111. </citerefentry>
  112. </para>
  113. </refsect1>
  114. <refsect1>
  115. <title>Legal</title>
  116. <para>wpa_supplicant is copyright (c) 2003-2017,
  117. Jouni Malinen <email>j@w1.fi</email> and
  118. contributors.
  119. All Rights Reserved.</para>
  120. <para>This program is licensed under the BSD license (the one with
  121. advertisement clause removed).</para>
  122. </refsect1>
  123. </refentry>