1 <!doctype refentry PUBLIC
"-//OASIS//DTD DocBook V4.1//EN">
5 <refentrytitle>wpa_priv
</refentrytitle>
6 <manvolnum>8</manvolnum>
9 <refname>wpa_priv
</refname>
11 <refpurpose>wpa_supplicant privilege separation helper
</refpurpose>
16 <command>wpa_priv
</command>
17 <arg>-c
<replaceable>ctrl path
</replaceable></arg>
19 <arg>-P
<replaceable>pid file
</replaceable></arg>
20 <arg>driver:ifname
<replaceable>[driver:ifname ...]
</replaceable></arg>
25 <title>Overview
</title>
27 <para><command>wpa_priv
</command> is a privilege separation helper that
28 minimizes the size of
<command>wpa_supplicant
</command> code that needs
29 to be run with root privileges.
</para>
31 <para>If enabled, privileged operations are done in the wpa_priv process
32 while leaving rest of the code (e.g., EAP authentication and WPA
33 handshakes) to operate in an unprivileged process (wpa_supplicant) that
34 can be run as non-root user. Privilege separation restricts the effects
35 of potential software errors by containing the majority of the code in an
36 unprivileged process to avoid the possibility of a full system
39 <para><command>wpa_priv
</command> needs to be run with network admin
40 privileges (usually, root user). It opens a UNIX domain socket for each
41 interface that is included on the command line; any other interface will
42 be off limits for
<command>wpa_supplicant
</command> in this kind of
43 configuration. After this,
<command>wpa_supplicant
</command> can be run as
44 a non-root user (e.g., all standard users on a laptop or as a special
45 non-privileged user account created just for this purpose to limit access
46 to user files even further).
</para>
49 <title>Example configuration
</title>
51 <para>The following steps are an example of how to configure
52 <command>wpa_priv
</command> to allow users in the
53 <emphasis>wpapriv
</emphasis> group to communicate with
54 <command>wpa_supplicant
</command> with privilege separation:
</para>
56 <para>Create user group (e.g., wpapriv) and assign users that
57 should be able to use wpa_supplicant into that group.
</para>
59 <para>Create /var/run/wpa_priv directory for UNIX domain sockets and
60 control user access by setting it accessible only for the wpapriv
63 <blockquote><programlisting>
64 mkdir /var/run/wpa_priv
65 chown root:wpapriv /var/run/wpa_priv
66 chmod
0750 /var/run/wpa_priv
67 </programlisting></blockquote>
69 <para>Start
<command>wpa_priv
</command> as root (e.g., from system
70 startup scripts) with the enabled interfaces configured on the
73 <blockquote><programlisting>
74 wpa_priv -B -c /var/run/wpa_priv -P /var/run/wpa_priv.pid wext:wlan0
75 </programlisting></blockquote>
77 <para>Run
<command>wpa_supplicant
</command> as non-root with a user
78 that is in the wpapriv group:
</para>
80 <blockquote><programlisting>
81 wpa_supplicant -i ath0 -c wpa_supplicant.conf
82 </programlisting></blockquote>
86 <title>Command Arguments
</title>
89 <term>-c ctrl path
</term>
91 <listitem><para>Specify the path to wpa_priv control directory
92 (Default: /var/run/wpa_priv/).
</para></listitem>
97 <listitem><para>Run as a daemon in the background.
</para></listitem>
103 <listitem><para>Set the location of the PID
104 file.
</para></listitem>
108 <term>driver:ifname [driver:ifname ...]
</term>
110 <listitem><para>The
<driver
> string dictates which of the
111 supported
<command>wpa_supplicant
</command> driver backends is to be
112 used. To get a list of supported driver types see wpa_supplicant help
113 (e.g, wpa_supplicant -h). The driver backend supported by most good
114 drivers is
<emphasis>wext
</emphasis>.
</para>
116 <para>The
<ifname
> string specifies which network
117 interface is to be managed by
<command>wpa_supplicant
</command>
118 (e.g., wlan0 or ath0).
</para>
120 <para><command>wpa_priv
</command> does not use the network interface
121 before
<command>wpa_supplicant
</command> is started, so it is fine to
122 include network interfaces that are not available at the time wpa_priv
123 is started. wpa_priv can control multiple interfaces with one process,
124 but it is also possible to run multiple
<command>wpa_priv
</command>
125 processes at the same time, if desired.
</para></listitem>
130 <title>See Also
</title>
133 <refentrytitle>wpa_supplicant
</refentrytitle>
134 <manvolnum>8</manvolnum>
140 <para>wpa_supplicant is copyright (c)
2003-
2007,
141 Jouni Malinen
<email>j@w1.fi
</email> and
143 All Rights Reserved.
</para>
145 <para>This program is dual-licensed under both the GPL version
2
146 and BSD license. Either license may be used at your option.
</para>