Greenbone Vulnerability Management Libraries 22.41.0
ldaputils.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2012-2023 Greenbone AG
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later
4 */
5
10
11#ifndef _GVM_UTIL_LDAPUTILS_H
12#define _GVM_UTIL_LDAPUTILS_H
13
14#include <glib.h>
15
18
26{
27 gchar *ldap_host;
28 gchar *auth_dn;
29 gboolean allow_plaintext;
30 gboolean ldaps_only;
31};
32
33int
35
36int
37ldap_connect_authenticate (const gchar *, const gchar *,
38 /* ldap_auth_info_t */ void *, const gchar *);
39
41
43ldap_auth_info_new (const gchar *, const gchar *, gboolean);
44
46ldap_auth_info_new_2 (const gchar *, const gchar *, gboolean, gboolean);
47
48#ifdef ENABLE_LDAP_AUTH
49
50#include <ldap.h>
51
52gchar *
53ldap_auth_info_auth_dn (const ldap_auth_info_t, const gchar *);
54
55LDAP *
56ldap_auth_bind (const gchar *, const gchar *, const gchar *, gboolean,
57 const gchar *);
58
59LDAP *
60ldap_auth_bind_2 (const gchar *, const gchar *, const gchar *, gboolean,
61 const gchar *, gboolean);
62
63gboolean
64ldap_auth_dn_is_good (const gchar *);
65
66#endif /* ENABLE_LDAP_AUTH */
67
68#endif /* not _GVM_UTIL_LDAPUTILS_H */
int ldap_enable_debug()
Dummy function for enabling LDAP debugging for manager.
Definition ldaputils.c:631
int ldap_connect_authenticate(const gchar *username, const gchar *password, void *ldap_auth_info, const gchar *cacert)
Dummy function for Manager.
Definition ldaputils.c:696
void ldap_auth_info_free(ldap_auth_info_t info)
Dummy function for Manager.
Definition ldaputils.c:713
ldap_auth_info_t ldap_auth_info_new(const gchar *ldap_host, const gchar *auth_dn, gboolean allow_plaintext)
Dummy function for manager.
Definition ldaputils.c:651
ldap_auth_info_t ldap_auth_info_new_2(const gchar *ldap_host, const gchar *auth_dn, gboolean allow_plaintext, gboolean ldaps_only)
Dummy function for manager.
Definition ldaputils.c:675
struct ldap_auth_info * ldap_auth_info_t
Authentication schema and address type.
Definition ldaputils.h:17
Schema (dn) and info to use for a basic ldap authentication.
Definition ldaputils.h:26
gboolean allow_plaintext
!Whether or not StartTLS or LDAPS is required.
Definition ldaputils.h:29
gboolean ldaps_only
Whether to try LDAPS before StartTLS.
Definition ldaputils.h:30
gchar * ldap_host
Address of the ldap server, might include port.
Definition ldaputils.h:27
gchar * auth_dn
DN to authenticate with.
Definition ldaputils.h:28