(fileName string)
| 1186 | } |
| 1187 | |
| 1188 | func isSSHConfigPathAllowed(fileName string) bool { |
| 1189 | if fileName == "" { |
| 1190 | return false |
| 1191 | } |
| 1192 | absolutePath, err := filepath.Abs(fileName) |
| 1193 | if err != nil { |
| 1194 | return false |
| 1195 | } |
| 1196 | if absolutePath == sshPath { |
| 1197 | return true |
| 1198 | } |
| 1199 | _, fileList, err := parseSSHConfigTree(sshPath) |
| 1200 | if err != nil { |
| 1201 | return false |
| 1202 | } |
| 1203 | for _, item := range fileList { |
| 1204 | if item.Path == absolutePath { |
| 1205 | return true |
| 1206 | } |
| 1207 | } |
| 1208 | return false |
| 1209 | } |
| 1210 | |
| 1211 | type sshLogHeader struct { |
| 1212 | DateStr string |
no test coverage detected