From 0e40d25eaeea05ce8e83dc866132aa9d0db028b9 Mon Sep 17 00:00:00 2001 From: Matt Mundell Date: Sat, 20 Apr 2019 15:34:09 +0200 Subject: [PATCH] Check that roles exist earlier This is so that other checks have access to the roles. In particular check_db_report_formats needs the roles to exist. --- src/manage_sql.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/manage_sql.c b/src/manage_sql.c index 1e51026a8..40b1ef067 100644 --- a/src/manage_sql.c +++ b/src/manage_sql.c @@ -17778,6 +17778,7 @@ check_db (int check_encryption_key) create_tables (); check_db_sequences (); set_db_version (GVMD_DATABASE_VERSION); + check_db_roles (); check_db_nvt_selectors (); check_db_nvts (); check_db_configs (); @@ -17789,7 +17790,6 @@ check_db (int check_encryption_key) goto fail; if (check_db_report_formats_trash ()) goto fail; - check_db_roles (); check_db_permissions (); check_db_settings (); cleanup_schedule_times ();