Skip to content

Commit

Permalink
Merge branch 'main' into gmp-doc-get-filters-duplicate
Browse files Browse the repository at this point in the history
  • Loading branch information
timopollmeier authored Dec 2, 2024
2 parents a145907 + 21dec6c commit 226f18a
Show file tree
Hide file tree
Showing 49 changed files with 6,840 additions and 3,453 deletions.
2 changes: 1 addition & 1 deletion .docker/build.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ARG GVM_LIBS_VERSION=oldstable

# We want gvm-libs to be ready so we use the build docker image of gvm-libs
FROM greenbone/gvm-libs:$GVM_LIBS_VERSION
FROM registry.community.greenbone.net/community/gvm-libs:${GVM_LIBS_VERSION}

# This will make apt-get install without question
ARG DEBIAN_FRONTEND=noninteractive
Expand Down
2 changes: 1 addition & 1 deletion .docker/prod.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN mkdir /build && \
cmake -DCMAKE_BUILD_TYPE=Release $FEATURE_TOGGLE /source && \
make DESTDIR=/install install

FROM greenbone/gvm-libs:${GVM_LIBS_VERSION}
FROM registry.community.greenbone.net/community/gvm-libs:${GVM_LIBS_VERSION}

ARG DEBIAN_FRONTEND=noninteractive

Expand Down
6 changes: 2 additions & 4 deletions .docker/start-gvmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

[ -z "$USER" ] && USER="admin"
[ -z "$PASSWORD" ] && PASSWORD="admin"
[ -z "$GVMD_ARGS" ] && GVMD_ARGS="--listen-mode=666"
[ -z "$GVMD_ARGS" ] && GVMD_ARGS="-f --listen-mode=666"
[ -z "$GVMD_USER" ] && GVMD_USER="gvmd"
[ -z "$PGRES_DATA" ] && PGRES_DATA="/var/lib/postgresql"

Expand Down Expand Up @@ -49,6 +49,4 @@ gvmd --modify-setting 78eceaec-3385-11ea-b237-28d24461215b --value "$uid"

echo "starting gvmd"
gvmd $GVMD_ARGS ||
(cat /var/log/gvm/gvmd.log && exit 1)

tail -f /var/log/gvm/gvmd.log
(echo "Starting gvmd failed" && exit 1)
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
- name: Configure and run tests
run: CTEST_OUTPUT_ON_FAILURE=1 cmake --build build -- tests test
- name: Upload test coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
file: build/coverage/coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
20 changes: 11 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ cmake_minimum_required (VERSION 3.0)
message ("-- Configuring Greenbone Vulnerability Manager...")

project (gvm
VERSION 23.7.1
VERSION 24.0.1
LANGUAGES C)

if (POLICY CMP0005)
Expand Down Expand Up @@ -103,7 +103,7 @@ include (CPack)

set (GVMD_DATABASE_VERSION 256)

set (GVMD_SCAP_DATABASE_VERSION 21)
set (GVMD_SCAP_DATABASE_VERSION 22)

set (GVMD_CERT_DATABASE_VERSION 8)

Expand Down Expand Up @@ -163,11 +163,13 @@ if (NOT GVMD_STATE_DIR)
set (GVMD_STATE_DIR "${GVM_STATE_DIR}/gvmd")
endif (NOT GVMD_STATE_DIR)

if (NOT GVM_LOG_DIR)
set (GVM_LOG_DIR "${LOCALSTATEDIR}/log/gvm")
else (NOT GVM_LOG_DIR)
set (GVM_LOG_DIR "${GVM_LOG_DIR}")
endif (NOT GVM_LOG_DIR)
if (NOT GVMD_LOG_FILE)
if (GVM_LOG_DIR)
set (GVMD_LOG_FILE "${GVM_LOG_DIR}/gvmd.log")
else (GVM_LOG_DIR)
set (GVMD_LOG_FILE "-")
endif (GVM_LOG_DIR)
endif (NOT GVMD_LOG_FILE)

set (GVM_SCAP_RES_DIR "${GVM_DATA_DIR}/scap")
set (GVM_CERT_RES_DIR "${GVM_DATA_DIR}/cert")
Expand Down Expand Up @@ -247,8 +249,8 @@ if (NOT CVSS3_RATINGS)
endif (NOT CVSS3_RATINGS)
add_definitions (-DCVSS3_RATINGS=${CVSS3_RATINGS})


message ("-- Install prefix: ${CMAKE_INSTALL_PREFIX}")
message ("-- Log file: ${GVMD_LOG_FILE}")

## Version

Expand Down Expand Up @@ -402,7 +404,7 @@ install (FILES src/alert_methods/vFire/alert
DESTINATION ${GVMD_DATA_DIR}/global_alert_methods/159f79a5-fce8-4ec5-aa49-7d17a77739a3/
PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)

install (CODE "file (MAKE_DIRECTORY \$ENV{DESTDIR}${GVMD_DATA_DIR}/wizards)")
install (CODE "file (MAKE_DIRECTORY \$ENV{DESTDIR}${GVMD_DATA_DIR}/wizards)")

install (FILES src/wizards/quick_first_scan.xml
src/wizards/get_tasks_deep.xml
Expand Down
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Prerequisites:

Install these prerequisites on Debian GNU/Linux 'Buster' 10:

apt-get install gcc cmake libglib2.0-dev libgnutls28-dev libpq-dev postgresql-server-dev-11 pkg-config libical-dev xsltproc libgpgme-dev
apt-get install gcc cmake libcjson-dev libglib2.0-dev libgnutls28-dev libpq-dev postgresql-server-dev-11 pkg-config libical-dev xsltproc libgpgme-dev

Prerequisites for building documentation:
* Doxygen
Expand Down
3 changes: 1 addition & 2 deletions config/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.


if (NOT SYSTEMD_SERVICE_DIR)
set (SYSTEMD_SERVICE_DIR "/lib/systemd/system")
set (SYSTEMD_SERVICE_DIR "${LIBDIR}/systemd/system")
endif (NOT SYSTEMD_SERVICE_DIR)

if (NOT LOGROTATE_DIR)
Expand Down
9 changes: 9 additions & 0 deletions doc/gvmd.8
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ File mode of the unix socket
\fB--listen-owner=\fISTRING\fB\f1
Owner of the unix socket
.TP
\fB--max-concurrent-scan-updates=\fINUMBER\fB\f1
Maximum number of scan updates that can run at the same time. Default: 0 (unlimited).
.TP
\fB--max-email-attachment-size=\fINUMBER\fB\f1
Maximum size of alert email attachments, in bytes.
.TP
Expand All @@ -121,9 +124,15 @@ Maximum size of user-defined message text in alert emails, in bytes.
\fB--max-ips-per-target=\fINUMBER\fB\f1
Maximum number of IPs per target.
.TP
\fB--mem-wait-retries=\fINUMBER\fB\f1
How often to try waiting for available memory. Default: 30. Each retry will wait for 10 seconds.
.TP
\fB-m, --migrate\f1
Migrate the database and exit.
.TP
\fB--min-mem-feed-update=\fINUMBER\fB\f1
Minimum memory in MiB for feed updates. Default: 0. Feed updates are skipped if less physical memory is available.
.TP
\fB--modify-scanner=\fISCANNER-UUID\fB\f1
Modify scanner SCANNER-UUID and exit.
.TP
Expand Down
27 changes: 27 additions & 0 deletions doc/gvmd.8.xml
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<p>Owner of the unix socket</p>
</optdesc>
</option>
<option>
<p><opt>--max-concurrent-scan-updates=<arg>NUMBER</arg></opt></p>
<optdesc>
<p>
Maximum number of scan updates that can run at the same time.
Default: 0 (unlimited).
</p>
</optdesc>
</option>
<option>
<p><opt>--max-email-attachment-size=<arg>NUMBER</arg></opt></p>
<optdesc>
Expand All @@ -287,12 +296,30 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<p>Maximum number of IPs per target.</p>
</optdesc>
</option>
<option>
<p><opt>--mem-wait-retries=<arg>NUMBER</arg></opt></p>
<optdesc>
<p>
How often to try waiting for available memory. Default: 30.
Each retry will wait for 10 seconds.
</p>
</optdesc>
</option>
<option>
<p><opt>-m, --migrate</opt></p>
<optdesc>
<p>Migrate the database and exit.</p>
</optdesc>
</option>
<option>
<p><opt>--min-mem-feed-update=<arg>NUMBER</arg></opt></p>
<optdesc>
<p>
Minimum memory in MiB for feed updates. Default: 0.
Feed updates are skipped if less physical memory is available.
</p>
</optdesc>
</option>
<option>
<p><opt>--modify-scanner=<arg>SCANNER-UUID</arg></opt></p>
<optdesc>
Expand Down
27 changes: 27 additions & 0 deletions doc/gvmd.html
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,15 @@ <h2>Options</h2>



<p><b>--max-concurrent-scan-updates=<em>NUMBER</em></b></p>

<p>
Maximum number of scan updates that can run at the same time.
Default: 0 (unlimited).
</p>



<p><b>--max-email-attachment-size=<em>NUMBER</em></b></p>

<p>Maximum size of alert email attachments, in bytes.</p>
Expand All @@ -242,12 +251,30 @@ <h2>Options</h2>



<p><b>--mem-wait-retries=<em>NUMBER</em></b></p>

<p>
How often to try waiting for available memory. Default: 30.
Each retry will wait for 10 seconds.
</p>



<p><b>-m, --migrate</b></p>

<p>Migrate the database and exit.</p>



<p><b>--min-mem-feed-update=<em>NUMBER</em></b></p>

<p>
Minimum memory in MiB for feed updates. Default: 0.
Feed updates are skipped if less physical memory is available.
</p>



<p><b>--modify-scanner=<em>SCANNER-UUID</em></b></p>

<p>Modify scanner SCANNER-UUID and exit.</p>
Expand Down
14 changes: 10 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ find_package (Threads)
## might occur.

pkg_check_modules (CJSON REQUIRED libcjson>=1.7.14)
pkg_check_modules (LIBGVM_BASE REQUIRED libgvm_base>=22.10)
pkg_check_modules (LIBGVM_UTIL REQUIRED libgvm_util>=22.10)
pkg_check_modules (LIBGVM_OSP REQUIRED libgvm_osp>=22.10)
pkg_check_modules (LIBGVM_GMP REQUIRED libgvm_gmp>=22.10)
pkg_check_modules (LIBGVM_BASE REQUIRED libgvm_base>=22.12)
pkg_check_modules (LIBGVM_UTIL REQUIRED libgvm_util>=22.12)
pkg_check_modules (LIBGVM_OSP REQUIRED libgvm_osp>=22.12)
pkg_check_modules (LIBGVM_GMP REQUIRED libgvm_gmp>=22.12)
pkg_check_modules (GNUTLS REQUIRED gnutls>=3.2.15)
pkg_check_modules (GLIB REQUIRED glib-2.0>=2.42)
pkg_check_modules (LIBBSD REQUIRED libbsd)
Expand Down Expand Up @@ -109,6 +109,7 @@ add_executable (manage-utils-test

debug_utils.c
gvmd.c gmpd.c
ipc.c
manage.c sql.c
manage_acl.c manage_configs.c manage_get.c
manage_license.c
Expand Down Expand Up @@ -140,6 +141,7 @@ add_executable (manage-test

debug_utils.c
gvmd.c gmpd.c
ipc.c
manage_utils.c sql.c
manage_acl.c manage_configs.c manage_get.c
manage_license.c
Expand Down Expand Up @@ -171,6 +173,7 @@ add_executable (manage-sql-test

debug_utils.c
gvmd.c gmpd.c
ipc.c
manage_utils.c manage.c sql.c
manage_acl.c manage_configs.c manage_get.c
manage_license.c
Expand Down Expand Up @@ -202,6 +205,7 @@ add_executable (gmp-tickets-test

debug_utils.c
gvmd.c gmpd.c
ipc.c
manage_utils.c manage.c sql.c
manage_acl.c manage_configs.c manage_get.c
manage_license.c
Expand Down Expand Up @@ -233,6 +237,7 @@ add_executable (utils-test

debug_utils.c
gvmd.c gmpd.c
ipc.c
manage_utils.c manage.c sql.c
manage_acl.c manage_configs.c manage_get.c
manage_license.c
Expand Down Expand Up @@ -281,6 +286,7 @@ add_executable (gvmd
main.c gvmd.c
debug_utils.c
gmpd.c
ipc.c
manage_utils.c manage.c sql.c
manage_acl.c manage_configs.c manage_get.c
manage_license.c
Expand Down
Loading

0 comments on commit 226f18a

Please sign in to comment.