summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas François <nicolas.francois@centraliens.net>2013-08-13 19:28:07 +0200
committerNicolas François <nicolas.francois@centraliens.net>2013-08-13 19:28:07 +0200
commite1a4b6e57beaddea659e0a3e2e4c347e89464aea (patch)
tree994ceef57cef8abf78b32103342cfc7598d262bb
parent5884ba907cc0a38f52a1178fba79dd52571b0531 (diff)
Document the semantic of ranges.
* libmisc/idmapping.h: Document what the upper and lower fields are in struct map_range. * man/newgidmap.1.xml: Document when the gid, gidlower and count argument are. * man/newuidmap.1.xml: Likewise for uid, uidlower and count.
-rw-r--r--ChangeLog8
-rw-r--r--libmisc/idmapping.h6
-rw-r--r--man/newgidmap.1.xml29
-rw-r--r--man/newuidmap.1.xml29
4 files changed, 69 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index ff486f2d..74de2e59 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2013-08-13 Nicolas François <nicolas.francois@centraliens.net>
+ * libmisc/idmapping.h: Document what the upper and lower fields
+ are in struct map_range.
+ * man/newgidmap.1.xml: Document when the gid, gidlower and count
+ argument are.
+ * man/newuidmap.1.xml: Likewise for uid, uidlower and count.
+
+2013-08-13 Nicolas François <nicolas.francois@centraliens.net>
+
* libmisc/salt.c (shadow_random): Use long instead of size_t.
Compatibility with size_t is easier to check since it's used for
smaller numbers (salt size).
diff --git a/libmisc/idmapping.h b/libmisc/idmapping.h
index 88cf7616..58d000f2 100644
--- a/libmisc/idmapping.h
+++ b/libmisc/idmapping.h
@@ -31,9 +31,9 @@
#define _IDMAPPING_H_
struct map_range {
- unsigned long upper;
- unsigned long lower;
- unsigned long count;
+ unsigned long upper; /* first ID inside the namespace */
+ unsigned long lower; /* first ID outside the namespace */
+ unsigned long count; /* Length of the inside and outside ranges */
};
extern struct map_range *get_map_ranges(int ranges, int argc, char **argv);
diff --git a/man/newgidmap.1.xml b/man/newgidmap.1.xml
index 4a8f6a5b..725dcd60 100644
--- a/man/newgidmap.1.xml
+++ b/man/newgidmap.1.xml
@@ -87,6 +87,35 @@
command line arguments and the gids allowed in <filename>/etc/subgid</filename>.
</para>
+ <para>
+ After the pid argument, <command>newgidmap</command> expects sets of 3 integers:
+ <variablelist>
+ <varlistentry>
+ <term>gid</term>
+ <listitem>
+ <para>
+ Begining of the range of GIDs inside the user namespace.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>lowergid</term>
+ <listitem>
+ <para>
+ Begining of the range of GIDs outside the user namespace.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>count</term>
+ <listitem>
+ <para>
+ Length of the ranges (both inside and outside the user namespace).
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
</refsect1>
<refsect1 id='options'>
diff --git a/man/newuidmap.1.xml b/man/newuidmap.1.xml
index 924ed9d1..0bb47b2e 100644
--- a/man/newuidmap.1.xml
+++ b/man/newuidmap.1.xml
@@ -84,6 +84,35 @@
command line arguments and the uids allowed in <filename>/etc/subuid</filename>.
</para>
+ <para>
+ After the pid argument, <command>newuidmap</command> expects sets of 3 integers:
+ <variablelist>
+ <varlistentry>
+ <term>uid</term>
+ <listitem>
+ <para>
+ Begining of the range of UIDs inside the user namespace.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>loweruid</term>
+ <listitem>
+ <para>
+ Begining of the range of UIDs outside the user namespace.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>count</term>
+ <listitem>
+ <para>
+ Length of the ranges (both inside and outside the user namespace).
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
</refsect1>
<refsect1 id='options'>