make webinterface translatable. there are around 20 short strings, all with context...
[kdenetwork.git] / doc / kppp / security.docbook
blobd3012f8bc03bb8485159659f3098366838a0ac32
1 <chapter id="security">
2 <title>&kppp; and security issues</title>
4 <para>This section is mainly for superusers (<systemitem>root</systemitem>)
5 people with high security demands, or simply technically interested people.  It
6 is not necessary to read this if you only use &Linux; at home for yourself,
7 although you may learn a thing or two in any case.</para>
9 <sect1 id="security-restricting-access">
10 <title>Restricting access to &kppp;</title>
12 <para>A system administrator might want to restrict access as to who is allowed
13 to use &kppp;.  There are two ways to accomplish this.</para>
15 <sect2 id="security-group-permissions">
16 <title>Restricting access with group permissions</title>
18 <para>Create a new group (you might want to name it
19 <systemitem>dialout</systemitem> or similar), and put every user that should be
20 allowed to use &kppp; into that group.  Then type at the prompt:</para>
22 <screen><prompt>#</prompt> <userinput><command>chown</command> <option>root.dialout</option> <filename>/opt/kde/bin/kppp</filename></userinput>
23 <prompt>#</prompt> <userinput><command>chmod</command> <option>4750</option> <filename>/opt/kde/bin/kppp</filename></userinput>
24 </screen>
26 <para>This assumes that &kde; was installed in <filename class="directory">
27 /opt/kde/</filename> and that your new group is named
28 <systemitem>dialout</systemitem>.</para>
30 </sect2>
32 <sect2 id="security-kppps-way">
33 <title>Restricting access &kppp;'s way</title>
35 <para>Before doing anything, &kppp; checks if there is a file named
36 <filename>/etc/kppp.allow</filename>. If such a file exists, only users named in
37 this file are allowed to dial out.  This file must be readable by everyone (but
38 of course <emphasis>NOT</emphasis> writable.)  Only login names are recognized,
39 so you cannot use <acronym>UID</acronym>'s in this file.  Here is a short
40 example:</para>
42 <screen>
43 # /etc/kppp.allow
44 # comment lines like this are ignored
45 # as well as empty lines
47 fred
48 karl
49 daisy
50 </screen>
52 <para>In the example above, only the users <systemitem>fred</systemitem>,
53 <systemitem>karl</systemitem> and <systemitem>daisy</systemitem> are allowed to
54 dial out, as well as every user with a <acronym>UID</acronym> of 0 (so you don't
55 have to explicitly list root in the file).</para>
57 </sect2>
59 </sect1>
61 <sect1 id="security-why-suid">
62 <title>&kppp; has the <acronym>SUID</acronym> bit on? What about
63 security?</title>
65 <para>It's virtually impossible to write a dialer without the
66 <acronym>SUID</acronym> bit that is both safe and easy to use for inexperienced
67 users.  &kppp; addresses the security issues with the following strategy.</para>
69 <itemizedlist>
70 <listitem>
71 <para>Immediately after the program starts, &kppp; forks.</para>
72 </listitem>
73 <listitem>
74 <para>The master process, which handles all the <acronym>GUI</acronym> operations
75 (such as user interaction), drops the <acronym>SUID</acronym> state after the
76 fork, and runs with normal user privileges.</para>
77 </listitem>
78 <listitem>
79 <para>The slave process keeps its  privileges, and is responsible for all
80 actions that need <systemitem>root</systemitem> privileges.  To
81 keep this part safe, no &kde; or &Qt; library calls are used here, just simple
82 library calls.  The source code for this process is short (around 500 lines) and
83 well documented, so it's easy for you to check it for security holes.</para>
84 </listitem>
85 <listitem>
86 <para>Master and slave processes communicate with standard &UNIX;
87 <acronym>IPC</acronym>.</para>
88 </listitem>
89 </itemizedlist>
91 <para>Special thanks to Harri Porten for writing this excellent piece of code.
92 It was thought to be impossible, but he managed it within a week.</para>
94 </sect1>
96 </chapter>