queue.c: add error if queue file can't be accessed

When having a disk-assisted queue without permission
to write to the specified queue file an error will
be put out.

closes https://github.com/rsyslog/rsyslog/issues/323
This commit is contained in:
PascalWithopf 2018-09-04 13:02:22 +02:00
parent 3b301f6f4b
commit 5b33121fe9

View File

@ -782,9 +782,9 @@ qqueueTryLoadPersistedInfo(qqueue_t *pThis)
if(stat((char*) pThis->pszQIFNam, &stat_buf) == -1) {
if(errno == ENOENT) {
DBGOPRINT((obj_t*) pThis, "clean startup, no .qi file found\n");
ABORT_FINALIZE(RS_RET_FILE_NOT_FOUND);
} else {
DBGOPRINT((obj_t*) pThis, "error %d trying to access .qi file\n", errno);
LogError(errno, RS_RET_IO_ERROR, "queue: %s: error %d could not access .qi file",
obj.GetName((obj_t*) pThis), errno);
ABORT_FINALIZE(RS_RET_IO_ERROR);
}
}