~serge-hallyn/ubuntu/raring/shadow/shadow-userns

« back to all changes in this revision

Viewing changes to debian/patches/userns/01_userns_doc

  • Committer: Serge Hallyn
  • Date: 2013-02-01 21:31:48 UTC
  • Revision ID: serge.hallyn@canonical.com-20130201213148-6ms9125tjn2lngnq
Add patchset by Eric Biederman to support subids for use by unprivileged
users to administer private user namespaces.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From ebiederm@xmission.com  Tue Jan 22 09:14:18 2013
 
2
Return-Path: <ebiederm@xmission.com>
 
3
X-Original-To: serge@hallyn.com
 
4
Delivered-To: serge@hallyn.com
 
5
Received: by mail.hallyn.com (Postfix, from userid 5001)
 
6
        id DAC33C80F4; Tue, 22 Jan 2013 09:14:18 +0000 (UTC)
 
7
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail
 
8
X-Spam-Level: 
 
9
X-Spam-Status: No, score=0.1 required=8.0 tests=BAD_ENC_HEADER,BAYES_00
 
10
        autolearn=no version=3.3.1
 
11
Received: from out02.mta.xmission.com (out02.mta.xmission.com [166.70.13.232])
 
12
        (using TLSv1 with cipher AES256-SHA (256/256 bits))
 
13
        (No client certificate requested)
 
14
        by mail.hallyn.com (Postfix) with ESMTPS id 274ACC80D1
 
15
        for <serge@hallyn.com>; Tue, 22 Jan 2013 09:14:14 +0000 (UTC)
 
16
Received: from out01.mta.xmission.com ([166.70.13.231])
 
17
        by out02.mta.xmission.com with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 
18
        (Exim 4.76)
 
19
        (envelope-from <ebiederm@xmission.com>)
 
20
        id 1TxZuB-0006Xm-N5; Tue, 22 Jan 2013 02:12:31 -0700
 
21
Received: from in02.mta.xmission.com ([166.70.13.52])
 
22
        by out01.mta.xmission.com with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 
23
        (Exim 4.76)
 
24
        (envelope-from <ebiederm@xmission.com>)
 
25
        id 1TxZuA-0005NR-BQ; Tue, 22 Jan 2013 02:12:30 -0700
 
26
Received: from c-98-207-153-68.hsd1.ca.comcast.net ([98.207.153.68] helo=eric-ThinkPad-X220.xmission.com)
 
27
        by in02.mta.xmission.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
 
28
        (Exim 4.76)
 
29
        (envelope-from <ebiederm@xmission.com>)
 
30
        id 1TxZu7-0004Pj-Ec; Tue, 22 Jan 2013 02:12:30 -0700
 
31
From: ebiederm@xmission.com (Eric W. Biederman)
 
32
To: Nicolas =?utf-8?Q?Fran=C3=A7ois?= <nicolas.francois@centraliens.net>
 
33
Cc: <Pkg-shadow-devel@lists.alioth.debian.org>,  Linux Containers <containers@lists.linux-foundation.org>,  "Michael Kerrisk \(man-pages\)" <mtk.manpages@gmail.com>,  "Serge E. Hallyn" <serge@hallyn.com>
 
34
References: <87d2wxshu0.fsf@xmission.com>
 
35
Date: Tue, 22 Jan 2013 01:12:23 -0800
 
36
In-Reply-To: <87d2wxshu0.fsf@xmission.com> (Eric W. Biederman's message of
 
37
        "Tue, 22 Jan 2013 01:11:19 -0800")
 
38
Message-ID: <877gn5shs8.fsf@xmission.com>
 
39
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)
 
40
MIME-Version: 1.0
 
41
Content-Type: text/plain
 
42
X-XM-AID: U2FsdGVkX18YouPWtKNAX3LovSW2+p/ONbuCHMFEQpM=
 
43
X-SA-Exim-Connect-IP: 98.207.153.68
 
44
X-SA-Exim-Mail-From: ebiederm@xmission.com
 
45
Subject: [PATCH 01/11] Documentation for /etc/subuid and /etc/subgid
 
46
X-SA-Exim-Version: 4.2.1 (built Wed, 14 Nov 2012 14:26:46 -0700)
 
47
X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com)
 
48
X-UID: 2071                                                  
 
49
Status: RO
 
50
Content-Length: 9835
 
51
Lines: 286
 
52
 
 
53
 
 
54
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
 
55
---
 
56
 man/Makefile.am  |    4 ++
 
57
 man/subgid.5.xml |  120 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
58
 man/subuid.5.xml |  120 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
59
 3 files changed, 244 insertions(+), 0 deletions(-)
 
60
 create mode 100644 man/subgid.5.xml
 
61
 create mode 100644 man/subuid.5.xml
 
62
 
 
63
Index: shadow/man/Makefile.am
 
64
===================================================================
 
65
--- shadow.orig/man/Makefile.am 2013-02-01 15:26:14.428082026 -0600
 
66
+++ shadow/man/Makefile.am      2013-02-01 15:27:37.000000000 -0600
 
67
@@ -43,6 +43,8 @@
 
68
        man5/shadow.5 \
 
69
        man1/su.1 \
 
70
        man5/suauth.5 \
 
71
+       man5/subgid.5 \
 
72
+       man5/subuid.5 \
 
73
        man8/useradd.8 \
 
74
        man8/userdel.8 \
 
75
        man8/usermod.8 \
 
76
@@ -94,6 +96,8 @@
 
77
        sg.1.xml \
 
78
        su.1.xml \
 
79
        suauth.5.xml \
 
80
+       subgid.5.xml \
 
81
+       subuid.5.xml \
 
82
        useradd.8.xml \
 
83
        userdel.8.xml \
 
84
        usermod.8.xml \
 
85
Index: shadow/man/subgid.5.xml
 
86
===================================================================
 
87
--- /dev/null   1970-01-01 00:00:00.000000000 +0000
 
88
+++ shadow/man/subgid.5.xml     2013-02-01 15:26:14.424082026 -0600
 
89
@@ -0,0 +1,120 @@
 
90
+<?xml version="1.0" encoding="UTF-8"?>
 
91
+<!--
 
92
+   Copyright (c) 2013 Eric W. Biederman
 
93
+   All rights reserved.
 
94
+  
 
95
+   Redistribution and use in source and binary forms, with or without
 
96
+   modification, are permitted provided that the following conditions
 
97
+   are met:
 
98
+   1. Redistributions of source code must retain the above copyright
 
99
+      notice, this list of conditions and the following disclaimer.
 
100
+   2. Redistributions in binary form must reproduce the above copyright
 
101
+      notice, this list of conditions and the following disclaimer in the
 
102
+      documentation and/or other materials provided with the distribution.
 
103
+   3. The name of the copyright holders or contributors may not be used to
 
104
+      endorse or promote products derived from this software without
 
105
+      specific prior written permission.
 
106
+  
 
107
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 
108
+   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 
109
+   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
 
110
+   PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT
 
111
+   HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 
112
+   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 
113
+   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 
114
+   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 
115
+   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 
116
+   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 
117
+   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
118
+-->
 
119
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
 
120
+  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
 
121
+<!-- SHADOW-CONFIG-HERE -->
 
122
+]>
 
123
+<refentry id='subgid.5'>
 
124
+  <refmeta>
 
125
+    <refentrytitle>subgid</refentrytitle>
 
126
+    <manvolnum>5</manvolnum>
 
127
+    <refmiscinfo class="sectdesc">File Formats and Conversions</refmiscinfo>
 
128
+    <refmiscinfo class="source">shadow-utils</refmiscinfo>
 
129
+    <refmiscinfo class="version">&SHADOW_UTILS_VERSION;</refmiscinfo>
 
130
+  </refmeta>
 
131
+  <refnamediv id='name'>
 
132
+    <refname>subgid</refname>
 
133
+    <refpurpose>the subordinate gid file</refpurpose>
 
134
+  </refnamediv>
 
135
+
 
136
+  <refsect1 id='description'>
 
137
+    <title>DESCRIPTION</title>
 
138
+    <para>
 
139
+      Each line in <filename>/etc/subgid</filename> contains
 
140
+      a user id and a range of suboridinate user ids that user
 
141
+      is allowed to use.
 
142
+
 
143
+      This is specified with three fields delimited by colons
 
144
+      (<quote>:</quote>).
 
145
+      These fields are:
 
146
+    </para>
 
147
+    <itemizedlist mark='bullet'>
 
148
+      <listitem>
 
149
+       <para>login name</para>
 
150
+      </listitem>
 
151
+      <listitem>
 
152
+       <para>numerical subordinate user ID</para>
 
153
+      </listitem>
 
154
+      <listitem>
 
155
+       <para>numerical subordinate user ID count</para>
 
156
+      </listitem>
 
157
+    </itemizedlist>
 
158
+
 
159
+    <para>
 
160
+      This file specifies the group IDs to be that each user may use
 
161
+      with the <command>newgidmap</command> command that ordinary users can use to
 
162
+      configure gid mapping in a user namespace.
 
163
+    </para>
 
164
+
 
165
+    <para>
 
166
+      Multiple ranges may be specified per user ID.
 
167
+    </para>
 
168
+
 
169
+  </refsect1>
 
170
+
 
171
+  <refsect1 id='files'>
 
172
+    <title>FILES</title>
 
173
+    <variablelist>
 
174
+      <varlistentry>
 
175
+       <term><filename>/etc/subgid</filename></term>
 
176
+       <listitem>
 
177
+         <para>Per user subordinate group IDs.</para>
 
178
+       </listitem>
 
179
+      </varlistentry>
 
180
+      <varlistentry>
 
181
+       <term><filename>/etc/subgid-</filename></term>
 
182
+       <listitem>
 
183
+         <para>Backup file for /etc/subgid.</para>
 
184
+       </listitem>
 
185
+      </varlistentry>
 
186
+    </variablelist>
 
187
+  </refsect1>
 
188
+
 
189
+  <refsect1 id='see_also'>
 
190
+    <title>SEE ALSO</title>
 
191
+    <para>
 
192
+      <citerefentry>
 
193
+       <refentrytitle>subuid</refentrytitle><manvolnum>5</manvolnum>
 
194
+      </citerefentry>,
 
195
+      <citerefentry>
 
196
+       <refentrytitle>logindefs</refentrytitle><manvolnum>5</manvolnum>
 
197
+      </citerefentry>,
 
198
+      <citerefentry>
 
199
+       <refentrytitle>newuidmap</refentrytitle><manvolnum>1</manvolnum>
 
200
+      </citerefentry>,
 
201
+      <citerefentry>
 
202
+       <refentrytitle>newgidmap</refentrytitle><manvolnum>1</manvolnum>
 
203
+      </citerefentry>,
 
204
+      <citerefentry>
 
205
+       <refentrytitle>usermod</refentrytitle><manvolnum>8</manvolnum>
 
206
+      </citerefentry>,
 
207
+    </para>
 
208
+  </refsect1>
 
209
+</refentry>
 
210
Index: shadow/man/subuid.5.xml
 
211
===================================================================
 
212
--- /dev/null   1970-01-01 00:00:00.000000000 +0000
 
213
+++ shadow/man/subuid.5.xml     2013-02-01 15:26:14.424082026 -0600
 
214
@@ -0,0 +1,120 @@
 
215
+<?xml version="1.0" encoding="UTF-8"?>
 
216
+<!--
 
217
+   Copyright (c) 2013 Eric W. Biederman
 
218
+   All rights reserved.
 
219
+  
 
220
+   Redistribution and use in source and binary forms, with or without
 
221
+   modification, are permitted provided that the following conditions
 
222
+   are met:
 
223
+   1. Redistributions of source code must retain the above copyright
 
224
+      notice, this list of conditions and the following disclaimer.
 
225
+   2. Redistributions in binary form must reproduce the above copyright
 
226
+      notice, this list of conditions and the following disclaimer in the
 
227
+      documentation and/or other materials provided with the distribution.
 
228
+   3. The name of the copyright holders or contributors may not be used to
 
229
+      endorse or promote products derived from this software without
 
230
+      specific prior written permission.
 
231
+  
 
232
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 
233
+   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 
234
+   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
 
235
+   PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT
 
236
+   HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 
237
+   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 
238
+   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 
239
+   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 
240
+   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 
241
+   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 
242
+   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
243
+-->
 
244
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
 
245
+  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
 
246
+<!-- SHADOW-CONFIG-HERE -->
 
247
+]>
 
248
+<refentry id='subuid.5'>
 
249
+  <refmeta>
 
250
+    <refentrytitle>subuid</refentrytitle>
 
251
+    <manvolnum>5</manvolnum>
 
252
+    <refmiscinfo class="sectdesc">File Formats and Conversions</refmiscinfo>
 
253
+    <refmiscinfo class="source">shadow-utils</refmiscinfo>
 
254
+    <refmiscinfo class="version">&SHADOW_UTILS_VERSION;</refmiscinfo>
 
255
+  </refmeta>
 
256
+  <refnamediv id='name'>
 
257
+    <refname>subuid</refname>
 
258
+    <refpurpose>the subordinate uid file</refpurpose>
 
259
+  </refnamediv>
 
260
+
 
261
+  <refsect1 id='description'>
 
262
+    <title>DESCRIPTION</title>
 
263
+    <para>
 
264
+      Each line in <filename>/etc/subuid</filename> contains
 
265
+      a user id and a range of suboridinate user ids that user
 
266
+      is allowed to use.
 
267
+
 
268
+      This is specified with three fields delimited by colons
 
269
+      (<quote>:</quote>).
 
270
+      These fields are:
 
271
+    </para>
 
272
+    <itemizedlist mark='bullet'>
 
273
+      <listitem>
 
274
+       <para>login name</para>
 
275
+      </listitem>
 
276
+      <listitem>
 
277
+       <para>numerical subordinate user ID</para>
 
278
+      </listitem>
 
279
+      <listitem>
 
280
+       <para>numerical subordinate user ID count</para>
 
281
+      </listitem>
 
282
+    </itemizedlist>
 
283
+
 
284
+    <para>
 
285
+      This file specifies the user IDs to be that each user may use
 
286
+      with the <command>newuidmap</command> command that ordinary users can use to
 
287
+      configure uid mapping in a user namespace.
 
288
+    </para>
 
289
+
 
290
+    <para>
 
291
+      Multiple ranges may be specified per user ID.
 
292
+    </para>
 
293
+
 
294
+  </refsect1>
 
295
+
 
296
+  <refsect1 id='files'>
 
297
+    <title>FILES</title>
 
298
+    <variablelist>
 
299
+      <varlistentry>
 
300
+       <term><filename>/etc/subuid</filename></term>
 
301
+       <listitem>
 
302
+         <para>Per user subordinate user IDs.</para>
 
303
+       </listitem>
 
304
+      </varlistentry>
 
305
+      <varlistentry>
 
306
+       <term><filename>/etc/subuid-</filename></term>
 
307
+       <listitem>
 
308
+         <para>Backup file for /etc/subuid.</para>
 
309
+       </listitem>
 
310
+      </varlistentry>
 
311
+    </variablelist>
 
312
+  </refsect1>
 
313
+
 
314
+  <refsect1 id='see_also'>
 
315
+    <title>SEE ALSO</title>
 
316
+    <para>
 
317
+      <citerefentry>
 
318
+       <refentrytitle>subgid</refentrytitle><manvolnum>5</manvolnum>
 
319
+      </citerefentry>,
 
320
+      <citerefentry>
 
321
+       <refentrytitle>logindefs</refentrytitle><manvolnum>5</manvolnum>
 
322
+      </citerefentry>,
 
323
+      <citerefentry>
 
324
+       <refentrytitle>newuidmap</refentrytitle><manvolnum>1</manvolnum>
 
325
+      </citerefentry>,
 
326
+      <citerefentry>
 
327
+       <refentrytitle>newgidmap</refentrytitle><manvolnum>1</manvolnum>
 
328
+      </citerefentry>,
 
329
+      <citerefentry>
 
330
+       <refentrytitle>usermod</refentrytitle><manvolnum>8</manvolnum>
 
331
+      </citerefentry>,
 
332
+    </para>
 
333
+  </refsect1>
 
334
+</refentry>