Merge pull request #14965 from stefanberger/nohidevols2

Have network files mounted read-only when -v parameter has 'ro' passed
This commit is contained in:
David Calavera
2015-08-07 19:10:59 -07:00
3 changed files with 75 additions and 16 deletions
+12
View File
@@ -1341,3 +1341,15 @@ func appendBaseEnv(env []string) []string {
}
return env
}
func createTmpFile(c *check.C, content string) string {
f, err := ioutil.TempFile("", "testfile")
c.Assert(err, check.IsNil)
filename := f.Name()
err = ioutil.WriteFile(filename, []byte(content), 0644)
c.Assert(err, check.IsNil)
return filename
}