(baseFile, value string)
| 959 | } |
| 960 | |
| 961 | func expandSSHIncludePaths(baseFile, value string) []string { |
| 962 | var includeFiles []string |
| 963 | for _, item := range strings.Fields(strings.ReplaceAll(value, "\"", "")) { |
| 964 | pattern := item |
| 965 | if !filepath.IsAbs(pattern) { |
| 966 | pattern = filepath.Join(filepath.Dir(baseFile), pattern) |
| 967 | } |
| 968 | matches, err := filepath.Glob(pattern) |
| 969 | if err != nil { |
| 970 | continue |
| 971 | } |
| 972 | sort.Strings(matches) |
| 973 | includeFiles = append(includeFiles, matches...) |
| 974 | } |
| 975 | return includeFiles |
| 976 | } |
| 977 | |
| 978 | func normalizeSSHDirectiveValue(key, value string) string { |
| 979 | if strings.EqualFold(key, "PermitRootLogin") && value == "prohibit-password" { |
no outgoing calls
no test coverage detected