NixOS/nixpkgs — pull request #3100 by tailhook (2014-06-26 18:17:49+00:00)
Title: Upgrade "shadow" to 4.2.1

This includes:

* Adding "newuidmap" and "newgidmap" setuid binaries
* Add nix code to manage ``/etc/subuid`` and ``/etc/subgid`` mappings in user-groups module

Those commands and files are useful for user namespaces (for example for running linux containers by non-root users)

Note: the module overwrites both ``/etc/subuid`` and ``/etc/subgid`` on rebuild. Hopefully imperative manipulation of the files is not needed because of:

1. Files were not supported in previous versions of nixos so unlikely anybody have them
2. There are no (established) tools to manipulate files in imperative way

The "shadow" 4.2.1 is used in archlinux since 2014-05-10. And ubuntu seems to use some patched version of 4.1.x that includes "newuidmap" and "newgidmap" commands.