Squashed 'vendor/src/github.com/docker/libcontainer/' changes from 8f74c29..68ea123

68ea123 Merge pull request #137 from mrunalp/dev/moveuplockthread
7f3bbbb Move locking to caller. Docker-DCO-1.1-Signed-off-by: Mrunal Patel <mrunalp@gmail.com> (github: mrunalp)
ef3c884 Merge pull request #136 from bernerdschaefer/nsinit-exec-with-flags
041fafc DefaultCreateCommand supports command w/ flags
164cd80 Merge pull request #135 from peterbourgon/master
c6edb4a Only import "testing" from *_test.go
bc06326 Merge pull request #134 from tianon/fix-more-dotclouds
95ce3af Update more "dotcloud/docker" refs to "docker/docker"
625c658 Merge pull request #103 from tianon/user
e31771f Move "pkg/user" into libcontainer and add support for GetUserGroupSupplementary to return "Home" too
7dc9dc3 Merge pull request #58 from maebashi/fix-setns-order
7cdbf09 Merge pull request #133 from soundcloud/non-linux-clock-ticks
5e2627e Merge pull request #130 from vishh/fix_cgroup_path
eafabef Implement system.GetClockTicks for all platforms
66aee74 Libcontainer fs.GetStats() will not look for cgroups relative to the cgroup of init process if the parent in cgroups.Cgroup is absolute. This is required to get stats of other containers while running inside a docker container.
e64f9a3 Merge pull request #105 from rhatdan/master
bc3c671 Add label.InitLabels functioni. Allows generation of labels based on options
f333c5c remove unnecessary headers
01a7f19 namespaces: nsenter: ignore nonexistent namespaces
e6a43c1 Merge pull request #128 from crosbymichael/fix-nsenter
76f1930 Merge pull request #127 from crosbymichael/update-docker-imports
52e7350 Correct nsenter fprintf syntax Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
4568ca7 Update imports for new docker location Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
010e87b Merge pull request #123 from tianon/dockerfile-tweaks
f348ac4 Merge pull request #121 from vishh/fix_network_stats
081a08e Merge pull request #126 from dhammika/125-null-term-ifr_name
47096e1 Fix veth network stats. Tx on the host vETH is ingress traffic and not egress.
c391368 Null-term ioctl ifr_name strings
356f7a9 Add a couple tweaks to the Dockerfile
6777537 Merge pull request #122 from tianon/makefile-rm
f8e987f Add missing "--rm" on "make sh"
0529478 Merge pull request #120 from crosbymichael/add-tests1
a0bee99 Add busybox rootfs so we can run containers
7d3cd40 Merge pull request #119 from vishh/fix_network_stats
469957c Do not mark any network stats as 'omitempty' since the value '0' is legal for those stats.
2a81a14 Make NetworkStats a pointer to help the callers ignore that stats if it cannot be returned for any reason.
5d39cec Merge pull request #117 from crosbymichael/add-integration-tests
feb1d28 Use short flag for identifying integration tests Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
00047d5 Update travis to test specific packages
39ce7cc Add code coverage to the tests Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
4404b15 Add start of netlink unit tests Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
200f719 Add makefile with build and test targets Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
53a67a7 Update dockerfile for running tests Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
80c1ae9 Merge pull request #64 from vishh/runin
b2337e4 Fix runin code for nsinit Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
bb85e2b 'nsinit exec' now uses namespaces.RunIn instead of namespaces.ExecIn.
1f28287 Updated RunIn API to match the new console handling behavior in HEAD.
145299f Adding RunIn to run a user specified command in an existing container, wait for it to exit and return the exit code. RunIn will connect to a user specified Terminal before running the command.
1f3d65f Merge pull request #115 from tianon/travis-arm
29d9a4d Add "linux/arm" to Travis
2d0c1a1 Merge pull request #114 from vmarmol/cgroups
de63d70 Small fix for GetAllCgroups().
47d9567 Merge pull request #107 from vishh/dev_null
00c55b3 Merge pull request #46 from dhammika/44-delete-bridge
81c2d3a Merge pull request #113 from tianon/travis-cgo
fbe52bc Add more Travis matrix targets (being explicit about CGO)
926cd81 Merge pull request #112 from tianon/travis-cross-again
b718ecf Add linux/386 testing back to Travis
cf45d14 Merge pull request #111 from tianon/fix-cross
6fca833 Fix 386 and arm cross-compile
818628a Merge pull request #110 from crosbymichael/sysro
0dcae82 Initially mount /sys as ro instead of remount
c4f66a1 Reopening stdin, stdout and stderr if they are pointing to /dev/null to not have '/dev/null' from the global namespace opened inside the container.
2e422fc Merge pull request #104 from tianon/more-generics
302da30 Merge pull request #102 from crosbymichael/add-exec
8f3a8cf Add Exec to container API Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
1cdf742 Update a few build tags to be more generic, add a couple more SETNS constants, and update Travis with a bunch of fixes/tweaks (including removing the nonfunctional cross-compile stuff for now)
3c03998 Merge pull request #101 from crosbymichael/selinux-build-tags
a10820a Add linux build tags for selinux Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
be85764 Merge pull request #100 from crosbymichael/add-dockerfile
2374226 Add dockerfile Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
b30e0e1 Merge pull request #99 from crosbymichael/improve-term-handling
b56aa06 Don't open slave in parent Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
18e1283 Add resize of term in tty mode Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
43b4258 Open with NOCTTY and set raw term Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
d661720 Remove terminal handling in libcontainer Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
fb3d909 Merge pull request #98 from thockin/netperf
d25aa3c Don't set the MTU for loopback interfaces.
f282224 Merge pull request #97 from crosbymichael/system-pkg
8947d07 Finish removing the dependency on docker/pkg/system
e9ec77a Migrate selinux system xattr calls and prctl calls Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
a2dc64c Add initial system pkg to libcontainer
65c37a8 Merge pull request #90 from crosbymichael/cross-compile
0ebcbde Remove unsupported file
fb67bb8 Merge pull request #89 from vmarmol/remove-freezer-stats
af4d853 Merge pull request #88 from pmorie/master
8de8fe9 Remove FreezerStats.
ea6e255 Remove unused arg from namespaces.NsEnter
8c0303d Merge pull request #87 from crosbymichael/systemd-stats
7e1cfc1 Dont fail on missing subsystem for systemd stats Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
50106c7 Fix nsinit function to get stats from systemd Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
cbd37fb Add systemd stats, reusing fs stats functionality
b3f798f Merge pull request #86 from crosbymichael/move-sync-pipe
48b2a41 Merge pull request #47 from rhatdan/master
422824c Move syncpipe into separate package
a3a4da3 Add code review updates
2d69029 Add netlink hooks to delete a bridge dev
b325827 Merge pull request #85 from vieux/remove_duplicate_caps
35e32b9 remove 2 duplicate caps
e79b114 Merge pull request #84 from tianon/travis-all
1e643a7 Merge pull request #79 from rjnagal/cgroup_testing
1c0ea4a Update Travis to test all the packages
52e70ec Merge pull request #83 from cf-guardian/create
b42d0cb Use conventional factory terminology
ca2de1b Merge pull request #81 from crosbymichael/update-factory
3385539 Replace ID with Path on the container Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
5001b7e Add Load method to factory
32221d5 Merge pull request #77 from leetreveil/spelling
49951d9 Allow caller to change the labels on a directory tree.
c427473 Merge pull request #80 from rjnagal/cgroup-cleanup
0916444 Improved comment and names.
dceaa2e Cleanup checks for non-existent cgroup file to be concise.
c1d25c1 Add a standalone test utility for cgroup package. Although it has some overlap with nsinit utility, it is useful to test cgroup functinality directly and try out new or internal features not exposed through nsinit.
46e34cf Merge pull request #76 from vmarmol/api-init
ff8b888 Merge pull request #78 from crosbymichael/rename-nsinit-main
704a90b Rename package correctly so the binary is nsinit Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
6a3cea1 Fix spelling
c90a2c5 Adding Initialize() to create a new container.
8e3130d Merge pull request #75 from vmarmol/fix-stats
b18a4fd Ignore stats that are not available
12c465c Merge pull request #67 from vmarmol/api2
a01dde8 Merge pull request #74 from rjnagal/cgroup_testing
d712d29 Add a cleanup method to cgroup fs. This will help in building a standalone cgroup test util. systemd does auto cleanup on empty, so doesn't need an extra interface.
dbb515f Update api proposal
173642a Basic version of libcontainer API.
99458b9 Merge pull request #60 from tianon/cross-travis
39ebd07 Merge pull request #61 from vishh/split_nsinit
28dadc5 Separate nsinit main from implementation. This is done inorder to package nsinit as part of docker binary.
4f2dd42 Add cross-compilation testing to .travis.yml
16f939a fix the order of setns()
77c5125 Merge pull request #56 from crosbymichael/nsinit-pause
3f0764f Add pause and unpause commands to nsinit Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
14567ad Merge pull request #55 from crosbymichael/nsinit-config
361ac10 Just output raw stats json Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
21b71ef Rename spec to config Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
53cfe0a Merge pull request #54 from crosbymichael/report-child-error
a980a96 Return error on shutdown call Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
bd7d1eb Fix parent type in sync pipe Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
e098c02 Update tests for network state Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
73ff1ad Fix cross compile with syscall Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
e791650 Add unit test for sync pipe Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
eb9a561 Address review comments
ca95445 Report child error better (and later)
f975ff9 Merge pull request #25 from vishh/network_stats
813d247 Fixing some nits.
dfb1ea8 Merge pull request #43 from cf-guardian/nsinit_usage
29adc8c Improve nsinit usage instructions
3e5fe45 Further refactoring.
ab4201f Refactoring.
98c2593 Refactores network Interface a bit to use NetworkState struct instead of a map for passing runtime information around.
edf1e85 RuntimeCkpt is now State and the checkpoint file is called state.json.
481552c Created a global runtime checkpoint for libcontainer. Got rid of the network specific runtime checkpoint.
9253412 1. Added a basic version of network stats inside network package. 2. Introducing a new checkpoint file 'network.stats' which will contain the network runtime information (veth interface names for now). 3. Adding network stats to 'nsinit stats'. 4. Added a libcontainer Stats API to get both network and cgroup stats
ce034df Merge pull request #50 from crosbymichael/create-state
f6ada60 Merge pull request #48 from crosbymichael/add-oom-event
5bb2501 Rename to InitPid Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
77dcaac Update code based on review comments Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
854bcc0 Update readme with state.json changes Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
81e5a3f Replace pid and started file with State type Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
e49f5f4 Merge pull request #51 from crosbymichael/type-context
43e877e Add tests and sample files for selinux and apparmor Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
882dfdd Update sample config with context changes Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
5c86dd9 Remove generic context and replace with fields Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
775666b Fix nits on chan direction and defer
5210a23 Merge pull request #39 from vmarmol/rename-container
60b381e Rename Container -> Config.
e783cac Merge pull request #41 from vishh/refactoring
0ebe104 Merge pull request #2 from crosbymichael/fix-crosscompile
d2c7999 Fix cross compile for network and node pkgs Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
626420b Merge pull request #1 from crosbymichael/refactor-fixes
0023305 Make MountConfig on container a pointer
1aff270 Fix veth json and tags Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
f216ad7 Use internal types in the API instead of duplicating the types.
952b884 Use internal types in the API instead of duplicating the types.
ad5286a Addressed more comments.
5615342 Minor fixes.
0f14662 Remove 'Context' type from the libcontainer API. It will be a generic map with string key and value henceforth.
c5f93a9 Reuse internal mount.Mount in the API. Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
ece2d83 Added DropCapabilities() and DropBoundingSet() API to libcontainer.
4c55db7 Rename MountSpec to MountConfig.
b502663 Updated libcontainer subpackage dependencies. Most subpackages now do not depend on their parent ('libcontainer') package. 'namespaces' and 'nsinit' still do. 'namespaces' need to refactored a bit more to move the API part of it to 'libcontainer' package and keep the namespace specific code inside that package. This change is not expected to break docker.
902319a Merge pull request #40 from crosbymichael/api-readme
78a5a42 Fix nit on wording Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
3cea8e2 Fix typo in sample configs Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
e77dc48 Update readme with API change explination Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2391c3d Merge pull request #38 from crosbymichael/add-specs
746bd3b Fix unit test path Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
d28d8b6 Update main readme with new configs folder Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
6bce786 Add minimal sample configuration files for testing Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
36663b1 Merge pull request #37 from vmarmol/allow-not-found
f9b158d Don't fail getting stats of unknown hierarchies.
17ce8d8 Merge pull request #35 from vmarmol/fixes
3acf21b Merge pull request #34 from bernerdschaefer/cgroup-stats-total-cpu-usage
3505bd7 Replacing docker-dev with libcontainer mailing list.
cc266ed CpuStats.CpuUsage includes TotalUsage
9fa6481 Add fs.NotifyOnOOM for out-of-memory notifications
2c29550 Merge pull request #27 from mrunalp/dev/nsenter_flags
88acda8 Add option parsing to nsenter and enable specifying commands with arguments. Docker-DCO-1.1-Signed-off-by: Mrunal Patel <mrunalp@gmail.com> (github: mrunalp)
8746529 Merge pull request #29 from vmarmol/fixes
fcce488 Require two LGTMs for non-maintainer changes.
da2edd6 Merge pull request #32 from crosbymichael/update-travis
619088c Update travis to run unit tests
077836d Merge pull request #31 from crosbymichael/update-sample-json
9da679b Update sample json file for quick testing Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
77ffd49 Merge pull request #30 from crosbymichael/revert-mount-cgroup
c7d1cb2 Revert "Mount cgroups in the container"
2a9ff02 Merge pull request #24 from crosbymichael/is-not-exist-errors
c4ec56a Merge pull request #26 from crosbymichael/device-copy-links
bbb502c Use lstat to check device symlinks Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
e00eadd Merge pull request #17 from alexlarsson/fix-close-race
874953d Ignore isnotexist errors for restrict paths
4145356 Merge pull request #21 from mrunalp/use_path_max
014bb3f Use PATH_MAX as buffer size for buffers containing paths. Docker-DCO-1.1-Signed-off-by: Mrunal Patel <mrunalp@gmail.com> (github: mrunalp)
3b5ae6c Merge pull request #15 from alexlarsson/mount-cgroup-in-container
b441dfa Mount cgroups in the container
e0e0da9 pkg/cgroups Add GetCgroupMounts() and GetAllSubsystems()
f602821 Fix invalid fd race
124aba2 Merge pull request #20 from vbatts/vbatts-cleanup_setns
d7cbde8 nsenter: fixing the cpp order
82a1592 Merge pull request #10 from glyn/hack
c59b670 Merge pull request #14 from tianon/travis
e3a8e4e Change how to become a maintainer
988950a Add placeholder for dev env setup
e39a0f1 Correct links to libcontainer issues
f363dd3 Clarify roadmap
976a57b Add section on testing
74409a5 Merge approval criteria
f589d42 Remove reference to non-existent script
97a3a71 Avoid implying Michael wrote the Maintainers' Guide
1c81b53 Aspiring maintainers must be aware of the election process
6087476 Grammatical improvements
3ce18ef Move hack directory contents to top level
5e3312f Remove reference to AUTHORS file
b49464f Initial hacker documentation
6980a6e Add Tianon as the .travis.yml maintainer
91b5dbe Update .travis.yml to invoke Docker's scripts directly
dae62af Merge pull request #12 from vbatts/vbatts-fix_setns_rhel6
a30b789 Merge pull request #11 from timthelion/patch-1
4fe4e5c Merge pull request #8 from LK4D4/fix_vet_errors
7fffa34 Merge pull request #5 from crosbymichael/build-flag
f00e7f9 Add travis.yml file Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
c43dd7b nsenter: fix setns() for rhel6 (glibc-2.12)
eb396d3 Grammar in README
0c2c75b Fix vet errors
1a01d3b Add build flag for nsenter file Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)

git-subtree-dir: vendor/src/github.com/docker/libcontainer
git-subtree-split: 68ea1234a0b046803aacb2562df0da12eec2b2f9
Merge commit 'cf82cb028ba4697efc10fed86caf62a3e938235f'
Merge pull request #252 from ncdc/update-libcontainer

Update libcontainer