Skip to content

Commit

Permalink
CHANGE: Change GVM_RUN_DIR to GSAD_RUN_DIR, GVMD_RUN_DIR
Browse files Browse the repository at this point in the history
The new path GSAD_RUN_DIR is specific to gsad and GVMD_RUN_DIR only
has to be shared with gvmd and other modules using GMP via file socket.

(cherry picked from commit 3a27a85)
  • Loading branch information
timopollmeier authored and mergify-bot committed Nov 16, 2021
1 parent 7079269 commit 7ecbe29
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
12 changes: 8 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,18 @@ endif (NOT DATADIR)
set (GSAD_DATA_DIR "${DATADIR}/gvm/gsad")
set (GSAD_CONFIG_DIR "${SYSCONFDIR}/gvm/")

if (NOT GVM_RUN_DIR)
set (GVM_RUN_DIR "/run/gvm")
endif (NOT GVM_RUN_DIR)
if (NOT GSAD_RUN_DIR)
set (GSAD_RUN_DIR "/run/gsad")
endif (NOT GSAD_RUN_DIR)

if (NOT GSAD_PID_PATH)
set (GSAD_PID_PATH "/run/gsad/gsad.pid")
set (GSAD_PID_PATH "${GSAD_RUN_DIR}/gsad.pid")
endif (NOT GSAD_PID_PATH)

if (NOT GVMD_RUN_DIR)
set (GVMD_RUN_DIR "/run/gvmd")
endif (NOT GVMD_RUN_DIR)

if (NOT GSAD_PID_DIR)
set (GSAD_PID_DIR "${GVM_RUN_DIR}")
endif (NOT GSAD_PID_DIR)
Expand Down
12 changes: 8 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,16 @@ if (GVM_CA_CERTIFICATE)
add_definitions (-DGVM_CA_CERTIFICATE="${GVM_CA_CERTIFICATE}")
endif (GVM_CA_CERTIFICATE)

if (GVM_RUN_DIR)
add_definitions (-DGVM_RUN_DIR="${GVM_RUN_DIR}")
endif (GVM_RUN_DIR)
if (GVMD_RUN_DIR)
add_definitions (-DGVMD_RUN_DIR="${GVMD_RUN_DIR}")
endif (GVMD_RUN_DIR)

if (GSAD_RUN_DIR)
add_definitions (-DGSAD_RUN_DIR="${GSAD_RUN_DIR}")
endif (GSAD_RUN_DIR)

if (GSAD_PID_PATH)
add_definitions (-DGSAD_PID_PATH="${GSAD_PID_PATH}")
add_definitions (-DGSAD_PID_PATH="${GSAD_PID_PATH}")
endif (GSAD_PID_PATH)

if (GSAD_DATA_DIR)
Expand Down
2 changes: 1 addition & 1 deletion src/gsad_gmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ gmp_init (const gchar *manager_address_unix, const gchar *manager_address_tls,
}
else
{
manager_address = g_build_filename (GVM_RUN_DIR, "gvmd.sock", NULL);
manager_address = g_build_filename (GVMD_RUN_DIR, "gvmd.sock", NULL);
manager_use_tls = 0;
}
manager_port = port_manager;
Expand Down

0 comments on commit 7ecbe29

Please sign in to comment.