Ignore permission errors on config-dir (#6894)

This commit is contained in:
Harshavardhana
2018-11-29 18:14:05 -08:00
committed by kannappanr
parent bef7c01c58
commit 26120d7838
3 changed files with 16 additions and 3 deletions
+5 -1
View File
@@ -71,9 +71,13 @@ func getRootCAs(certsCAsDir string) (*x509.CertPool, error) {
// Get all CA file names.
var caFiles []string
fis, err := readDir(certsCAsDir)
if err != nil {
if err != nil && err != errFileNotFound {
return nil, err
}
// Return success if CA's directory is missing.
if err == errFileNotFound {
return nil, nil
}
for _, fi := range fis {
// Skip all directories.
if hasSuffix(fi, slashSeparator) {