From e1a4b6e57beaddea659e0a3e2e4c347e89464aea Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolas=20Fran=C3=A7ois?= Date: Tue, 13 Aug 2013 19:28:07 +0200 Subject: [PATCH] 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. --- ChangeLog | 8 ++++++++ libmisc/idmapping.h | 6 +++--- man/newgidmap.1.xml | 29 +++++++++++++++++++++++++++++ man/newuidmap.1.xml | 29 +++++++++++++++++++++++++++++ 4 files changed, 69 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index ff486f2d..74de2e59 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2013-08-13 Nicolas François + + * 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 * libmisc/salt.c (shadow_random): Use long instead of size_t. 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 /etc/subgid. + + After the pid argument, newgidmap expects sets of 3 integers: + + + gid + + + Begining of the range of GIDs inside the user namespace. + + + + + lowergid + + + Begining of the range of GIDs outside the user namespace. + + + + + count + + + Length of the ranges (both inside and outside the user namespace). + + + + + 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 /etc/subuid. + + After the pid argument, newuidmap expects sets of 3 integers: + + + uid + + + Begining of the range of UIDs inside the user namespace. + + + + + loweruid + + + Begining of the range of UIDs outside the user namespace. + + + + + count + + + Length of the ranges (both inside and outside the user namespace). + + + + + -- 2.40.0