Documentation for /etc/subuid and /etc/subgid

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
login.defs.5: Document the new variables in login.defs

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Implement commonio_append.

To support files that do not have a simple unique key implement
commonio_append to allow new entries to be added.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Add backend support for suboridnate uids and gids

These files list the set of subordinate uids and gids that users are allowed
to use.   The expect use case is with the user namespace but other uses are
allowed.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Implement find_new_sub_uids find_new_sub_gids

Functions for finding new subordinate uid and gids ranges for use
with useradd.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
userdel: Add support for removing subordinate user and group ids.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
useradd: Add support for subordinate user identifiers

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Add support for detecting busy subordinate user ids

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
usermod: Add support for subordinate uids and gids.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
newusers: Add support for assiging subordinate uids and gids.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Add LIBSELINUX to newuidmap and newgidmap LDADD

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
subordinateio: Fix subordinate_parse to have an internal static buffer

subordinate_parse is supposed to return a static structure that
represents one line in /etc/subuid or /etc/subgid.  I goofed and
failed to make the variable rangebuf that holds the username of
in the returned structure static.

Add this missing static specification.

Author: <Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
usermod: add v:w:V:W: to getopt

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
fix typo in subxid.5

login.defs, not logindefs.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
newuidmap,newgidmap: New suid helpers for using subordinate uids and gids

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
userns: add argument sanity checking

In find_new_sub_{u,g}ids, check for min, count and max values.

In idmapping.c:get_map_ranges(), make sure that the value passed
in for ranges did not overflow.  Couldn't happen with the current
code, but this is a sanity check for any future potential mis-uses.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>