diff --git a/src/util-classification-config.c b/src/util-classification-config.c index 5af16a6a6f..48c5e22c2a 100644 --- a/src/util-classification-config.c +++ b/src/util-classification-config.c @@ -88,7 +88,7 @@ static inline int SCClassConfInitContext(DetectEngineCtx *de_ctx) if (fd == NULL) { filename = SCClassConfGetConfFilename(); if ( (fd = fopen(filename, "r")) == NULL) { - SCLogError(SC_ERR_FOPEN_ERROR, "Error opening file: \"%s\"", filename); + SCLogError(SC_ERR_FOPEN_ERROR, "Error opening file: \"%s\": %s", filename, strerror(errno)); goto error; } } @@ -117,7 +117,10 @@ static inline int SCClassConfInitContext(DetectEngineCtx *de_ctx) fclose(fd); fd = NULL; } - return -1; + + printf("\nPlease check the \"classification-file\" option in your suricata.yaml file.\n"); + exit(EXIT_FAILURE); +// return -1; } /** diff --git a/src/util-error.c b/src/util-error.c index b993683df2..bcd134517c 100644 --- a/src/util-error.c +++ b/src/util-error.c @@ -71,6 +71,7 @@ const char * SCErrorToString(SCError err) CASE_CODE (SC_ERR_DEPTH_MISSING_CONTENT); CASE_CODE (SC_ERR_OFFSET_MISSING_CONTENT); CASE_CODE (SC_ERR_NO_URICONTENT_NEGATION); + CASE_CODE (SC_ERR_FOPEN_ERROR); default: return "UNKNOWN_ERROR"; }