Move mount logic into Mount type

Signed-off-by: Michael Crosby <michael@docker.com>
Add tmpfs support to Mount

Signed-off-by: Michael Crosby <michael@docker.com>
Use blkio.throttle.* stats when CFQ is not in use

This makes blkio's GetStats try to read blkio.io_serviced_recursive
first and fall back to read the stats from blkio.throttle in case it
can't. blkio.io_serviced_recursive seems to be available across all
kernels with CFQ enabled.

This closes #165

Signed-off-by: Johannes 'fish' Ziemke <github@freigeist.org>
Merge pull request #168 from crosbymichael/tmpfs

Add support for user defined mounts in tmpfs
Merge pull request #167 from discordianfish/use-blkio-throttle-stats-as-backup

Use blkio.throttle.* stats when CFQ is not in use
user: *: refactor and expand libcontainer/user API

This patch refactors most of GetUserGroupSupplementaryHome and its
signature, to make using it much simpler. The private parsing functions
have also been exposed (parsePasswdFile, parseGroupFile) to allow custom
data source to be used (increasing the versatility of the user/ tools).

In addition, file path wrappers around the formerly private API
functions have been added to make usage of the API for callers easier if
the files that are being parsed are on the filesystem (while the
io.Reader APIs are exposed for non-traditional usecases).

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (github: cyphar)
*: convert to new user/ API

This patch fixes callers of the user/ API within libcontainer to use the
new interfaces.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (github: cyphar)
user: lookup: added os/user-like lookup API

This patch adds an os/user-like user lookup API, implemented in pure Go.
It also has some features not present in the standard library
implementation (such as group lookups).

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (github: cyphar)
user: add unit tests for GetExecUser

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (github: cyphar)