{"push_id":1108127647,"size":13,"distinct_size":13,"ref":"refs/heads/master","head":"15a36e0e690387eb6585ade1921eb6b0dfd246ad","before":"fdf24fd3118748fb4a4a3ef5d18a0946ce7898c5","commits":[{"sha":"6e136cd880936296f7245ef34188976fd350eeb4","author":{"email":"f75897670c17327c42ab201733fb8a81ff9f4c34@tremily.us","name":"W. Trevor King"},"message":"ccon: Use a Unix socket (not pipes) for host <-> container communication\n\nThis will let us pass file descriptors back and forth.  For example,\nwe'll want to pass a pseudoterminal master from the container to the\nhost process with the coming terminal option.","distinct":true,"url":"https://api.github.com/repos/wking/ccon/commits/6e136cd880936296f7245ef34188976fd350eeb4"},{"sha":"774466630b8ad09b607fa78be5a050056ca05739","author":{"email":"f75897670c17327c42ab201733fb8a81ff9f4c34@tremily.us","name":"W. Trevor King"},"message":"ccon: Fix 'perror' -> 'PERROR' in run_hooks\n\nI missed this one in 990ce2df (ccon: Replace perror(...) with\nPERROR(...), 2015-12-09).","distinct":true,"url":"https://api.github.com/repos/wking/ccon/commits/774466630b8ad09b607fa78be5a050056ca05739"},{"sha":"3c633fea236226574d8ce9e98569cef1890aa55b","author":{"email":"f75897670c17327c42ab201733fb8a81ff9f4c34@tremily.us","name":"W. Trevor King"},"message":"ccon: Add process.terminal\n\nI was confused about what this was for until very recently, but pty(7)\nand the kernel's devpts docs cleared me up.\n\nThe file-descriptor-passing code follows the example in cmsg(3).  The\ndup_stdin argument added to exec_process allows us to preserve the\npipe carying the container-process PID for pre-start hooks.\n\nI'm not wild about the copy looping.  FreeBSD has a copy-forever form\nof sendfile, but it's just for file -> stream socket [1].  Linux has\nno restrictions on sources and targets, but doesn't support\ncopy-forever lengths [2].  Linux's splice (on which Linux's sendfile\nis now based) also doesn't support copy-forever lengths [3].  It's\npossible that splice would be a more efficient approach to this\ncommit's userspace copying for pseudoterminal master, but we can look\nfor that optimization bridge if userspace-copy performance is a\nproblem.  For example, userspace copying is how Python's pty.spawn\nworks [4], and while Python's pty module doesn't get much love, it's a\nreasonable architecture model for the initial ccon-terminal work.\n\nI don't close the host process's stdin on EOF, because we may still be\nexecuting post-stop hooks.  Those post-stop hooks inherit the host\nprocess's standard streams, so if there's nothing open on\nfile-descriptor zero, the first file they open will end up there, and\nthey (or their children) may mistake it for stdin.  This happens with\nour current examples/good/oci/0.1.0, where the post-stop hook goes\nthrough a 'ccon-oci hook ...' Python process.  Python 3.4.3 opens a\nnumber of files without O_CLOEXEC, including a /tmp/ffi... (I haven't\ntracked down what this file is about).  Strace shows entries like:\n\n  open(\"/tmp/ffi1a7rZS\", O_RDWR|O_CREAT|O_EXCL, 0600) = 0\n\nAnd when the Python process execs the OCI-config's post-stop hook\n(including 'cat' in our OCI example), that hook will read from\nwhatever happens to be open on file-descriptor zero.  By leaving the\nfile open, we ensure that subsequent reads by any process inheriting\nthe host process's standard streams will still EOF, instead of\nreturning garbage from /tmp/ffi... or some such file.\n\n[1]: https://www.freebsd.org/cgi/man.cgi?query=sendfile&manpath=FreeBSD+10.2-RELEASE\n[2]: http://man7.org/linux/man-pages/man2/sendfile.2.html\n[3]: http://man7.org/linux/man-pages/man2/splice.2.html\n[4]: https://docs.python.org/3/library/pty.html#pty.spawn","distinct":true,"url":"https://api.github.com/repos/wking/ccon/commits/3c633fea236226574d8ce9e98569cef1890aa55b"},{"sha":"9e8a7c9374ebc2959bb83f0fe50741505c6ccf09","author":{"email":"f75897670c17327c42ab201733fb8a81ff9f4c34@tremily.us","name":"W. Trevor King"},"message":"ccon-oci: Add support for process.terminal\n\nNow that I understand what it's about and ccon supports it.\n\nI updated the instructions to echo into ccon-oci's stdin instead of\nattempting to drive it from the calling terminal.  As the README docs\nfor process.terminal explain, when terminal is set true, we want raw\nkeystroke-level stuff going in on stdin and get raw video-level stuff\nout on stdout.  Instead of trying to do that from a cooked terminal,\njust pipe the keystrokes in on stdout.  If you already have a terminal\nand want an interactive OCI container, you should *unset*\nprocess.terminal so the container process inherits the same terminal\nstandard streams that any process invoked from your terminal would\nget.","distinct":true,"url":"https://api.github.com/repos/wking/ccon/commits/9e8a7c9374ebc2959bb83f0fe50741505c6ccf09"},{"sha":"b13813d1ea00e1c171da6a53d1e61560b71cc1da","author":{"email":"f75897670c17327c42ab201733fb8a81ff9f4c34@tremily.us","name":"W. Trevor King"},"message":"README: Close parens and fix namespace.mount.mounts for do-not-touch\n\nFix typos from 6e4b0bff (README: Document this project, 2015-10-15).","distinct":true,"url":"https://api.github.com/repos/wking/ccon/commits/b13813d1ea00e1c171da6a53d1e61560b71cc1da"},{"sha":"7e0a81d5015629d973136fb5e104f5c4d48db9d2","author":{"email":"f75897670c17327c42ab201733fb8a81ff9f4c34@tremily.us","name":"W. Trevor King"},"message":"README: Fix '`namespace`' -> '`namespaces`' typo\n\nTypo from 6e4b0bff (README: Document this project, 2015-10-15).","distinct":true,"url":"https://api.github.com/repos/wking/ccon/commits/7e0a81d5015629d973136fb5e104f5c4d48db9d2"},{"sha":"af9fda7b3a0c12d53613452b58c050358f112af8","author":{"email":"f75897670c17327c42ab201733fb8a81ff9f4c34@tremily.us","name":"W. Trevor King"},"message":"README: Explicitly mention individual inherited namespaces\n\nWe explicitly describe joining namespace and creating new namespaces,\nand we explicitly describe inheriting *all* host namespaces, so we\nmight as well explicitly describe inheriting a particular host\nnamespace.  This is already covered under our generic:\n\n  In general, leaving out a particular value [means \"don't touch\n  that\"].\n\nrule from the \"Lifecyle\" section, but it doesn't hurt to be\nextra-clear.","distinct":true,"url":"https://api.github.com/repos/wking/ccon/commits/af9fda7b3a0c12d53613452b58c050358f112af8"},{"sha":"20740fe928d36fdf85df77fe6f23a4e15e9f3fe6","author":{"email":"f75897670c17327c42ab201733fb8a81ff9f4c34@tremily.us","name":"W. Trevor King"},"message":"README: Remove path/other incompatibility for namespace objects\n\nThis was initially based on OCI's limitation [1].  But I never felt\nthat strongly about that limitation [2,3].  And join-and-tweak is\noccasionally useful (see namespaces.mount in\nexamples/good/create-exec-delete-root/exec.json).  We never enforced\nthe nominal restriction, so this commit updates the docs to allow\njoin-and-tweak.  Users who try to tweak nonsensical things will get\nerrors from the kernel rejecting the invalid tweaks.\n\n[1]: https://github.com/opencontainers/specs/pull/158\n[2]: https://github.com/opencontainers/specs/pull/158#issuecomment-138687129\n[3]: https://github.com/opencontainers/specs/pull/158#issuecomment-138997548","distinct":true,"url":"https://api.github.com/repos/wking/ccon/commits/20740fe928d36fdf85df77fe6f23a4e15e9f3fe6"},{"sha":"d497583648aa4274ec38f63bb9e3018b42ce3288","author":{"email":"f75897670c17327c42ab201733fb8a81ff9f4c34@tremily.us","name":"W. Trevor King"},"message":"ccon: Fix 'namespaces_fds' -> 'namespace_fds' typo\n\nTypo from 56d745bf (ccon: Shift namespace-path file-open to before the\nclone, 2015-12-20, v0.3.0).","distinct":true,"url":"https://api.github.com/repos/wking/ccon/commits/d497583648aa4274ec38f63bb9e3018b42ce3288"},{"sha":"0b358f234fba1d7fb72dcb1e6be241651cf6b430","author":{"email":"f75897670c17327c42ab201733fb8a81ff9f4c34@tremily.us","name":"W. Trevor King"},"message":"ccon: Join user namespaces before other setns calls\n\nAvoid permissions errors that come from attempting other joins first:\n\n  terminal-1$ unshare --user --map-root-user --uts sh\n  sh-4.3# echo $$\n  10124\n\n  terminal-2$ nsenter --uts=/proc/10124/ns/uts sh\n  nsenter: reassociate to namespace 'ns/uts' failed: Operation not permitted\n  terminal-2$ nsenter --user=/proc/10124/ns/user --preserve-credentials \\\n  > nsenter --uts=/proc/10124/ns/uts sh\n  sh-4.3#\n\nIt seems like there might be situations where joining a user namespace\nfirst would *reduce* your permissions.  In that case, we'd probably\nwant to let the config author set the join order.  But until I see one\nof those situations, we'll stick with this hard-coded approach.","distinct":true,"url":"https://api.github.com/repos/wking/ccon/commits/0b358f234fba1d7fb72dcb1e6be241651cf6b430"},{"sha":"ea63c43019a25aae1b8d0bcdd410aff2968d59bf","author":{"email":"f75897670c17327c42ab201733fb8a81ff9f4c34@tremily.us","name":"W. Trevor King"},"message":"Update links to cgroups documentation\n\nWith 34a9304a (Merge branch 'for-4.5' of\ngit://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup, 2016-01-13,\n[1]), Linux restructured their cgroups documentation.  This commit\nupdates all of our Documentation/cgroups references to match the new\nlayout.\n\n[1]: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=34a9304a96d6351c2d35dcdc9293258378fc0bd8","distinct":true,"url":"https://api.github.com/repos/wking/ccon/commits/ea63c43019a25aae1b8d0bcdd410aff2968d59bf"},{"sha":"a3a0df529349015a737a05ac1e7a340225547394","author":{"email":"f75897670c17327c42ab201733fb8a81ff9f4c34@tremily.us","name":"W. Trevor King"},"message":"ccon: Fix 'from container' -> 'from host' in handle_child LOG\n\nThis is a copy/paste typo from 732ed0f8 (ccon: Setup uid_map,\nsetgroups, and gid_map, 2015-10-14, 0.1.0).","distinct":true,"url":"https://api.github.com/repos/wking/ccon/commits/a3a0df529349015a737a05ac1e7a340225547394"},{"sha":"15a36e0e690387eb6585ade1921eb6b0dfd246ad","author":{"email":"f75897670c17327c42ab201733fb8a81ff9f4c34@tremily.us","name":"W. Trevor King"},"message":"ccon: Better error handling in handle_parent\n\nPreviously socket trouble could lead to the parent process exiting\nafter running the pre-start hooks but without running the post-stop\nhooks.  Similarly, pre-start failures would set 'err' but that value\nwas never used.  This commit cleans up the handling, so all\npost-pre-start failures set err, try and kill the child process, and\njump to 'wait'.  After the container process is reaped into 'exit' and\nthe post-stop hooks are run, we return 'err' (if there was an error in\nhandle_parent) or 'exit' (if the handle_parent code went off\nsmoothly).","distinct":true,"url":"https://api.github.com/repos/wking/ccon/commits/15a36e0e690387eb6585ade1921eb6b0dfd246ad"}]}