ldaputils.h
Go to the documentation of this file.
/* SPDX-FileCopyrightText: 2012-2023 Greenbone AG
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef _GVM_LDAPUTILS_H
#define _GVM_LDAPUTILS_H
#include <glib.h>
typedef struct ldap_auth_info *ldap_auth_info_t;
struct ldap_auth_info
{
gchar *ldap_host;
gchar *auth_dn;
gboolean allow_plaintext;
gboolean ldaps_only;
};
int
ldap_enable_debug (void);
int
ldap_connect_authenticate (const gchar *, const gchar *,
/* ldap_auth_info_t */ void *, const gchar *);
void ldap_auth_info_free (ldap_auth_info_t);
ldap_auth_info_t
ldap_auth_info_new (const gchar *, const gchar *, gboolean);
ldap_auth_info_t
ldap_auth_info_new_2 (const gchar *, const gchar *, gboolean, gboolean);
#ifdef ENABLE_LDAP_AUTH
#include <ldap.h>
gchar *
ldap_auth_info_auth_dn (const ldap_auth_info_t, const gchar *);
LDAP *
ldap_auth_bind (const gchar *, const gchar *, const gchar *, gboolean,
const gchar *);
LDAP *
ldap_auth_bind_2 (const gchar *, const gchar *, const gchar *, gboolean,
const gchar *, gboolean);
gboolean
ldap_auth_dn_is_good (const gchar *);
#endif /* ENABLE_LDAP_AUTH */
#endif /* not _GVM_LDAPUTILS_H */
ldap_auth_info_new
ldap_auth_info_t ldap_auth_info_new(const gchar *, const gchar *, gboolean)
Dummy function for manager.
Definition ldaputils.c:651
ldap_auth_info_t
struct ldap_auth_info * ldap_auth_info_t
Authentication schema and address type.
Definition ldaputils.h:17
ldap_connect_authenticate
int ldap_connect_authenticate(const gchar *, const gchar *, void *, const gchar *)
Dummy function for Manager.
Definition ldaputils.c:696
ldap_auth_info_new_2
ldap_auth_info_t ldap_auth_info_new_2(const gchar *, const gchar *, gboolean, gboolean)
Dummy function for manager.
Definition ldaputils.c:675
ldap_auth_info_free
void ldap_auth_info_free(ldap_auth_info_t)
Dummy function for Manager.
Definition ldaputils.c:713
ldap_enable_debug
int ldap_enable_debug(void)
Dummy function for enabling LDAP debugging for manager.
Definition ldaputils.c:631
ldap_auth_info
Schema (dn) and info to use for a basic ldap authentication.
Definition ldaputils.h:26
ldap_auth_info::allow_plaintext
gboolean allow_plaintext
!Whether or not StartTLS or LDAPS is required.
Definition ldaputils.h:29
ldap_auth_info::ldaps_only
gboolean ldaps_only
Whether to try LDAPS before StartTLS.
Definition ldaputils.h:30
ldap_auth_info::ldap_host
gchar * ldap_host
Address of the ldap server, might include port.
Definition ldaputils.h:27
ldap_auth_info::auth_dn
gchar * auth_dn
DN to authenticate with.
Definition ldaputils.h:28