Skip to content

Commit 47d73b2

Browse files
bpfosterestesp
authored andcommitted
Fix ro mount option being passed
"ro" was not parsed out of the string, so it was passed as part of data to mount(). This would lead to mount() returning an invalid argument code. Separate out the "ro" option, much like "userxattr", which will allow the MS-RDONLY mountflag to get set. Signed-off-by: Ben Foster <[email protected]> (cherry picked from commit f3daf32)
1 parent 8165fea commit 47d73b2

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

snapshots/overlay/overlayutils/check.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ func NeedsUserXAttr(d string) (bool, error) {
176176
}
177177

178178
opts := []string{
179+
"ro",
179180
fmt.Sprintf("lowerdir=%s:%s,upperdir=%s,workdir=%s", filepath.Join(td, "lower2"), filepath.Join(td, "lower1"), filepath.Join(td, "upper"), filepath.Join(td, "work")),
180181
"userxattr",
181182
}

0 commit comments

Comments
 (0)