dirmngr: Only print info for no ldapserver file

* dirmngr/dirmngr.c (parse_ldapserver_file): Only print info
for ENOENT.

--
It is very common that there is no ldapserver file. In that
case users are confused by an error printed at dirmngr startup.
This commit is contained in:
Andre Heinecke 2018-10-24 09:17:39 +02:00
parent 6b36c16f77
commit 01baee2b0e
No known key found for this signature in database
GPG Key ID: 2978E9D40CBABA5C
1 changed files with 5 additions and 1 deletions

View File

@ -1629,7 +1629,11 @@ parse_ldapserver_file (const char* filename)
fp = es_fopen (filename, "r");
if (!fp)
{
log_error (_("error opening '%s': %s\n"), filename, strerror (errno));
if (errno == ENOENT)
log_info ("No ldapserver file at: '%s'\n", filename);
else
log_error (_("error opening '%s': %s\n"), filename,
strerror (errno));
return NULL;
}