containers / virtcontainers

A Go package for building hardware virtualized container runtimes
Apache License 2.0
139 stars 43 forks source link

filesystem: set correct access mode for pod dir tree #647

Closed grahamwhaley closed 6 years ago

grahamwhaley commented 6 years ago

Some of the filesystem pod data tree (/var/lib/virtcontainers/*) is currently created with the permission 01000 (d---------). This looks like we have forgotten to or in the dirMode bits into the MkdirAll() calls.

Or in the appropriate bits.

Fixes: #638

Signed-off-by: Graham whaley graham.whaley@intel.com

sboeuf commented 6 years ago

LGTM

grahamwhaley commented 6 years ago

repushed with gofmt fixes to appease gods of CI

jodh-intel commented 6 years ago

Good catch! Could you add a test or two to filesystem_test.go?

grahamwhaley commented 6 years ago

heh, OK @jodh-intel , I did consider post-push that maybe I can add a test for it - let me add it to my list... I'll mark this as DNM in the mean time.

grahamwhaley commented 6 years ago

sure, np. I was going to ask you if the tests were OK once the CI ran. I'll wait to see if @sboeuf @amshinde have any more thoughts on the merging of the mode bits into the global var, and then rework as necessary...

grahamwhaley commented 6 years ago

updated, re-pushed