mount: also detect if uid or gid are set in same option string: -o uid=123,gid=456
This commit is contained in:
parent
67b82b4a28
commit
07c40780b3
1 changed files with 5 additions and 2 deletions
|
@ -50,8 +50,11 @@ func mountOptions(VFS *vfs.VFS, device string, mountpoint string, opt *mountlib.
|
||||||
hasExtraOption := func(optionName string) bool {
|
hasExtraOption := func(optionName string) bool {
|
||||||
optionName += "="
|
optionName += "="
|
||||||
for _, option := range opt.ExtraOptions {
|
for _, option := range opt.ExtraOptions {
|
||||||
if strings.HasPrefix(option, optionName) {
|
suboptions := strings.Split(option, ",")
|
||||||
return true
|
for _, suboption := range suboptions {
|
||||||
|
if strings.HasPrefix(suboption, optionName) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
|
Loading…
Reference in a new issue