projectatomic / oci-systemd-hook

OCI hook to enable running systemd in a container
GNU General Public License v3.0
64 stars 26 forks source link

MS_MOVE content under /run, need to differentiate directories from files #73

Closed rhatdan closed 7 years ago

rhatdan commented 7 years ago

You can only MS_MOVE a directory to a directory, and a file to a file. Currently we are only creating directories, so when a user tries to mount a socket into a container it fails.

docker run -v /run/docker.sock:/run/docker.sock initcontainer Fails

Signed-off-by: Daniel J Walsh dwalsh@redhat.com

rhatdan commented 7 years ago

@rhvgoyal PTAL @mrunalp PTAL

rhatdan commented 7 years ago

https://github.com/nightvisi0n PTAL

rhatdan commented 7 years ago

Fixes https://github.com/projectatomic/oci-systemd-hook/issues/72

rhvgoyal commented 7 years ago

Looked at the code and it looks ok. You did a good bug fix in makepath() recursion path. I have not tested it. I am relying on your testing.

LGTM