Skip to content

Commit

Permalink
Fix ro mount option being passed
Browse files Browse the repository at this point in the history
"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 <bpfoster@gmail.com>
(cherry picked from commit f3daf32)
  • Loading branch information
bpfoster authored and estesp committed Jul 28, 2023
1 parent 8165fea commit 47d73b2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions snapshots/overlay/overlayutils/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ func NeedsUserXAttr(d string) (bool, error) {
}

opts := []string{
"ro",
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")),
"userxattr",
}
Expand Down

0 comments on commit 47d73b2

Please sign in to comment.