fix bad spelling

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
Davanum Srinivas 2020-04-10 07:15:16 -04:00 committed by Srini Brahmaroutu
parent 5f0ba4923c
commit e2ef310046
2 changed files with 6 additions and 6 deletions

View File

@ -346,14 +346,14 @@ func StartsWithBackstep(rel string) bool {
return rel == ".." || strings.HasPrefix(filepath.ToSlash(rel), "../") return rel == ".." || strings.HasPrefix(filepath.ToSlash(rel), "../")
} }
// sanitizedOptionsForLogging will return a comma seperated string containing // sanitizedOptionsForLogging will return a comma separated string containing
// options and sensitiveOptions. Each entry in sensitiveOptions will be // options and sensitiveOptions. Each entry in sensitiveOptions will be
// replaced with the string sensitiveOptionsRemoved // replaced with the string sensitiveOptionsRemoved
// e.g. o1,o2,<masked>,<masked> // e.g. o1,o2,<masked>,<masked>
func sanitizedOptionsForLogging(options []string, sensitiveOptions []string) string { func sanitizedOptionsForLogging(options []string, sensitiveOptions []string) string {
seperator := "" separator := ""
if len(options) > 0 && len(sensitiveOptions) > 0 { if len(options) > 0 && len(sensitiveOptions) > 0 {
seperator = "," separator = ","
} }
sensitiveOptionsStart := "" sensitiveOptionsStart := ""
@ -364,7 +364,7 @@ func sanitizedOptionsForLogging(options []string, sensitiveOptions []string) str
} }
return strings.Join(options, ",") + return strings.Join(options, ",") +
seperator + separator +
sensitiveOptionsStart + sensitiveOptionsStart +
sensitiveOptionsEnd sensitiveOptionsEnd
} }

View File

@ -103,7 +103,7 @@ func (mounter *Mounter) MountSensitive(source string, target string, fstype stri
} }
// doMount runs the mount command. mounterPath is the path to mounter binary if containerized mounter is used. // doMount runs the mount command. mounterPath is the path to mounter binary if containerized mounter is used.
// sensitiveOptions is an extention of options except they will not be logged (because they may contain sensitive material) // sensitiveOptions is an extension of options except they will not be logged (because they may contain sensitive material)
func (mounter *Mounter) doMount(mounterPath string, mountCmd string, source string, target string, fstype string, options []string, sensitiveOptions []string) error { func (mounter *Mounter) doMount(mounterPath string, mountCmd string, source string, target string, fstype string, options []string, sensitiveOptions []string) error {
mountArgs, mountArgsLogStr := MakeMountArgsSensitive(source, target, fstype, options, sensitiveOptions) mountArgs, mountArgsLogStr := MakeMountArgsSensitive(source, target, fstype, options, sensitiveOptions)
if len(mounterPath) > 0 { if len(mounterPath) > 0 {
@ -187,7 +187,7 @@ func MakeMountArgs(source, target, fstype string, options []string) (mountArgs [
} }
// MakeMountArgsSensitive makes the arguments to the mount(8) command. // MakeMountArgsSensitive makes the arguments to the mount(8) command.
// sensitiveOptions is an extention of options except they will not be logged (because they may contain sensitive material) // sensitiveOptions is an extension of options except they will not be logged (because they may contain sensitive material)
func MakeMountArgsSensitive(source, target, fstype string, options []string, sensitiveOptions []string) (mountArgs []string, mountArgsLogStr string) { func MakeMountArgsSensitive(source, target, fstype string, options []string, sensitiveOptions []string) (mountArgs []string, mountArgsLogStr string) {
// Build mount command as follows: // Build mount command as follows:
// mount [-t $fstype] [-o $options] [$source] $target // mount [-t $fstype] [-o $options] [$source] $target