]> granicus.if.org Git - shadow/blob - man/newuidmap.1.xml
remove unused fn commonio_next
[shadow] / man / newuidmap.1.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3    Copyright (c) 2013 Eric W. Biederman
4    All rights reserved.
5   
6    Redistribution and use in source and binary forms, with or without
7    modification, are permitted provided that the following conditions
8    are met:
9    1. Redistributions of source code must retain the above copyright
10       notice, this list of conditions and the following disclaimer.
11    2. Redistributions in binary form must reproduce the above copyright
12       notice, this list of conditions and the following disclaimer in the
13       documentation and/or other materials provided with the distribution.
14    3. The name of the copyright holders or contributors may not be used to
15       endorse or promote products derived from this software without
16       specific prior written permission.
17   
18    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19    ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
21    PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT
22    HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 -->
30 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
31   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
32 <!-- SHADOW-CONFIG-HERE -->
33 ]>
34
35 <refentry id='newuidmap.1'>
36   <refmeta>
37     <refentrytitle>newuidmap</refentrytitle>
38     <manvolnum>1</manvolnum>
39     <refmiscinfo class="sectdesc">User Commands</refmiscinfo>
40     <refmiscinfo class="source">shadow-utils</refmiscinfo>
41     <refmiscinfo class="version">&SHADOW_UTILS_VERSION;</refmiscinfo>
42   </refmeta>
43   <refnamediv id='name'>
44     <refname>newuidmap</refname>
45     <refpurpose>set the uid mapping of a user namespace</refpurpose>
46   </refnamediv>
47
48   <refsynopsisdiv id='synopsis'>
49     <cmdsynopsis>
50       <command>newuidmap</command>
51       <arg choice='plain'>
52         <replaceable>pid</replaceable>
53       </arg>
54       <arg choice='plain'>
55         <replaceable>uid</replaceable>
56       </arg>
57       <arg choice='plain'>
58         <replaceable>loweruid</replaceable>
59       </arg>
60       <arg choice='plain'>
61         <replaceable>count</replaceable>
62       </arg>
63       <arg choice='opt'>
64         <arg choice='plain'>
65           <replaceable>uid</replaceable>
66         </arg>
67         <arg choice='plain'>
68           <replaceable>loweruid</replaceable>
69         </arg>
70         <arg choice='plain'>
71           <replaceable>count</replaceable>
72         </arg>
73         <arg choice='opt'>
74           <replaceable>...</replaceable>
75         </arg>
76       </arg>
77     </cmdsynopsis>
78   </refsynopsisdiv>
79
80   <refsect1 id='description'>
81     <title>DESCRIPTION</title>
82     <para>
83       The <command>newuidmap</command> sets <filename>/proc/[pid]/uid_map</filename> based on its
84       command line arguments and the uids allowed in <filename>/etc/subuid</filename>.
85       Note that the root user is not exempted from the requirement for a valid
86       <filename>/etc/subuid</filename> entry.
87     </para>
88
89     <para>
90       After the pid argument, <command>newuidmap</command> expects sets of 3 integers:
91       <variablelist>
92         <varlistentry>
93           <term>uid</term>
94           <listitem>
95             <para>
96               Beginning of the range of UIDs inside the user namespace.
97             </para>
98           </listitem>
99         </varlistentry>
100         <varlistentry>
101           <term>loweruid</term>
102           <listitem>
103             <para>
104               Beginning of the range of UIDs outside the user namespace.
105             </para>
106           </listitem>
107         </varlistentry>
108         <varlistentry>
109           <term>count</term>
110           <listitem>
111             <para>
112               Length of the ranges (both inside and outside the user namespace).
113             </para>
114           </listitem>
115         </varlistentry>
116       </variablelist>
117     </para>
118
119     <para>
120       <command>newuidmap</command> verifies that the caller is the owner
121       of the process indicated by <option>pid</option> and that for each
122       of the above sets, each of the UIDs in the range [loweruid,
123       loweruid+count] is allowed to the caller according to
124       <filename>/etc/subuid</filename> before setting
125       <filename>/proc/[pid]/uid_map</filename>.
126     </para>
127     <para>
128       Note that newuidmap may be used only once for a given process.
129     </para>
130   </refsect1>
131
132   <refsect1 id='options'>
133     <title>OPTIONS</title>
134     <para>
135       There currently are no options to the <command>newuidmap</command> command.
136     </para>
137     <variablelist remap='IP'>
138     </variablelist>
139   </refsect1>
140
141   <refsect1 id='files'>
142     <title>FILES</title>
143     <variablelist>
144       <varlistentry>
145         <term><filename>/etc/subuid</filename></term>
146         <listitem>
147           <para>List of user's subordinate user IDs.</para>
148         </listitem>
149       </varlistentry>
150       <varlistentry>
151         <term><filename>/proc/[pid]/uid_map</filename></term>
152         <listitem>
153           <para>Mapping of uids from one between user namespaces.</para>
154         </listitem>
155       </varlistentry>
156     </variablelist>
157   </refsect1>
158
159   <refsect1 id='see_also'>
160     <title>SEE ALSO</title>
161     <para>
162       <citerefentry>
163         <refentrytitle>login.defs</refentrytitle><manvolnum>5</manvolnum>
164       </citerefentry>,
165       <citerefentry>
166         <refentrytitle>newusers</refentrytitle><manvolnum>8</manvolnum>
167       </citerefentry>,
168       <citerefentry>
169         <refentrytitle>subuid</refentrytitle><manvolnum>5</manvolnum>
170       </citerefentry>,
171       <citerefentry>
172         <refentrytitle>useradd</refentrytitle><manvolnum>8</manvolnum>
173       </citerefentry>,
174       <citerefentry>
175         <refentrytitle>usermod</refentrytitle><manvolnum>8</manvolnum>
176       </citerefentry>,
177       <citerefentry>
178         <refentrytitle>userdel</refentrytitle><manvolnum>8</manvolnum>
179       </citerefentry>.
180     </para>
181   </refsect1>
182 </refentry>