If .secrets file is not used it means that encrypted password is not used. Moved log entry away from error log and placed it to message log. It still prints it multiple times though.
This commit is contained in:
VilhoRaatikka
2014-10-02 09:44:30 +03:00
parent cd0c17676e
commit bb11f6236f

View File

@ -74,9 +74,21 @@ int len;
snprintf(secret_file, 255, "%s/etc/.secrets", home); snprintf(secret_file, 255, "%s/etc/.secrets", home);
/* Try to access secrets file */ /* Try to access secrets file */
if (access(secret_file, R_OK) == -1) { if (access(secret_file, R_OK) == -1)
{
int eno = errno; int eno = errno;
errno = 0; errno = 0;
if (eno == ENOENT)
{
LOGIF(LM, (skygw_log_write(
LOGFILE_MESSAGE,
"Encrypted password file %s can't be accessed "
"(%s). Password encryption is not used.",
secret_file,
strerror(eno))));
}
else
{
LOGIF(LE, (skygw_log_write_flush( LOGIF(LE, (skygw_log_write_flush(
LOGFILE_ERROR, LOGFILE_ERROR,
"Error : access for secrets file " "Error : access for secrets file "
@ -84,6 +96,7 @@ int len;
secret_file, secret_file,
eno, eno,
strerror(eno)))); strerror(eno))));
}
return NULL; return NULL;
} }