Don't die when daemon cannot read certs.d

Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
This commit is contained in:
sh7dm 2019-11-25 10:57:38 +03:00 committed by Dmitry Sharshakov
parent 8840071c26
commit 2808762b27

View file

@ -55,7 +55,7 @@ func hasFile(files []os.FileInfo, name string) bool {
// provided TLS configuration.
func ReadCertsDirectory(tlsConfig *tls.Config, directory string) error {
fs, err := ioutil.ReadDir(directory)
if err != nil && !os.IsNotExist(err) {
if err != nil && !os.IsNotExist(err) && !os.IsPermission(err) {
return err
}