mount: also detect if uid or gid are set in same option string: -o uid=123,gid=456

This commit is contained in:
albertony 2020-11-15 00:44:28 +01:00 committed by Nick Craig-Wood
parent 67b82b4a28
commit 07c40780b3

View File

@ -50,8 +50,11 @@ func mountOptions(VFS *vfs.VFS, device string, mountpoint string, opt *mountlib.
hasExtraOption := func(optionName string) bool {
optionName += "="
for _, option := range opt.ExtraOptions {
if strings.HasPrefix(option, optionName) {
return true
suboptions := strings.Split(option, ",")
for _, suboption := range suboptions {
if strings.HasPrefix(suboption, optionName) {
return true
}
}
}
return false