Skip to content

Commit

Permalink
Fix: use krb5-multidev
Browse files Browse the repository at this point in the history
Because openvas-smb is depending on heimdal and the packages libkrb5-dev
and heimdal-dev are conflicting on some Debian version openvas-scanner
should install krb5-multidev instead.
  • Loading branch information
nichtsfrei committed Jan 15, 2025
1 parent adc3ec4 commit 8c0e21d
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
6 changes: 5 additions & 1 deletion .devcontainer/build-cmake-project.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@ cd $WORKD_DIR
set -ex
cmake -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cmake --build build --target install
sudo ldconfig
LDCONFIG="ldconfig"
if [ "$(id -u)" -ne 0 ]; then
LDCONFIG="sudo ldconfig"
fi
$LDCONFIG
2 changes: 1 addition & 1 deletion .github/install-openvas-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ apt-get update && apt-get install --no-install-recommends --no-install-suggests
libbsd-dev \
libgnutls30 \
libgssapi3-heimdal \
libkrb5-dev \
krb5-multidev \
libasn1-8-heimdal \
libroken19-heimdal \
libhdb9-heimdal \
Expand Down
4 changes: 2 additions & 2 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Prerequisites:
* libgnutls >= 3.6.4
* libcurl4-gnutls-dev
* libbsd
* libkrb5-dev
* krb5-multidev

Prerequisites for building documentation:
* Doxygen
Expand Down Expand Up @@ -57,7 +57,7 @@ Install prerequisites on Debian GNU/Linux 'Bullseye' 11:
apt-get install gcc pkg-config libssh-gcrypt-dev libgnutls28-dev \
libglib2.0-dev libjson-glib-dev libpcap-dev libgpgme-dev bison libksba-dev \
libsnmp-dev libgcrypt20-dev redis-server libbsd-dev libcurl4-gnutls-dev \
libkrb5-dev
krb5-multidev



Expand Down
9 changes: 7 additions & 2 deletions misc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@ pkg_check_modules (GLIB REQUIRED glib-2.0>=2.42)
pkg_check_modules (GLIB_JSON REQUIRED json-glib-1.0>=1.4.4)
pkg_check_modules (GNUTLS REQUIRED gnutls>=3.6.4)
pkg_check_modules (CURL REQUIRED libcurl>=7.74.0)
pkg_check_modules (KRB5 REQUIRED krb5)
pkg_check_modules (KRB5_GSSAPI REQUIRED krb5-gssapi)

# Set the custom path for krb5-multidev
pkg_check_modules (KRB5 REQUIRED mit-krb5)
pkg_check_modules (KRB5_GSSAPI REQUIRED mit-krb5-gssapi)
message(STATUS "KRB5_INCLUDE_DIRS: ${KRB5_INCLUDE_DIRS}")



pkg_check_modules (LIBGVM_BASE REQUIRED libgvm_base>=22.4)
pkg_check_modules (LIBGVM_UTIL REQUIRED libgvm_util>=22.4)
Expand Down
12 changes: 3 additions & 9 deletions misc/openvas-krb5.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception

#include <krb5/krb5.h>
#include <stdbool.h>
#ifndef OPENVAS_KRB5
#define OPENVAS_KRB5 1
#include <krb5.h>
#include <stdbool.h>
#include <stddef.h>
// #include <krb5/krb5.h>
// Enables or disables the cache implementation.
//
// When using the cached functions it will store each credential in a memory
Expand Down Expand Up @@ -66,12 +66,6 @@ typedef struct
struct OKrb5Target target;
} OKrb5Credential;

typedef struct
{
krb5_data data;
krb5_auth_context auth_context;
} OKrb5Data;

// Finds the kdc defined for the given realm.
//
// It returns the found kdc into `kdc` when `kdc` is not NULL.
Expand Down

0 comments on commit 8c0e21d

Please sign in to comment.