OpenVAS Libraries  9.0.1
ldap_connect_auth.h
Go to the documentation of this file.
1 /* OpenVAS Libraries
2  * $Id$
3  * Description: Header for LDAP-Connect Authentication module.
4  *
5  * Authors:
6  * Felix Wolfsteller <felix.wolfsteller@intevation.de>
7  *
8  * Copyright:
9  * Copyright (C) 2012 Greenbone Networks GmbH
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
24  */
25 
26 #ifndef LDAP_CONNECT_AUTH_H
27 #define LDAP_CONNECT_AUTH_H
28 
29 #include <glib.h>
30 
33 
41 {
42  gchar *ldap_host;
43  gchar *auth_dn;
44  gboolean allow_plaintext;
45 };
46 
47 int ldap_connect_authenticate (const gchar *, const gchar *,
48  /*ldap_auth_info_t */ void *, const gchar *);
49 
50 void ldap_auth_info_free (ldap_auth_info_t);
51 
52 ldap_auth_info_t
53 ldap_auth_info_new (const gchar *, const gchar *, gboolean);
54 
55 #ifdef ENABLE_LDAP_AUTH
56 
57 #include <ldap.h>
58 
59 gchar*
60 ldap_auth_info_auth_dn (const ldap_auth_info_t, const gchar*);
61 
62 LDAP *
63 ldap_auth_bind (const gchar *, const gchar *, const gchar *, gboolean,
64  const gchar *);
65 
66 gboolean ldap_auth_dn_is_good (const gchar *);
67 
68 #endif /* ENABLE_LDAP_AUTH */
69 
70 #endif /* not LDAP_CONNECT_AUTH_H */
struct ldap_auth_info * ldap_auth_info_t
Authentication schema and address type.
Definition: ldap_connect_auth.h:32
gchar * ldap_host
Address of the ldap server, might include port.
Definition: ldap_connect_auth.h:42
gchar * auth_dn
DN to authenticate with.
Definition: ldap_connect_auth.h:43
gboolean allow_plaintext
!Whether or not StartTLS is required.
Definition: ldap_connect_auth.h:44
int ldap_connect_authenticate(const gchar *, const gchar *, void *, const gchar *)
Dummy function for Manager.
Definition: ldap_connect_auth.c:425
Schema (dn) and info to use for a basic ldap authentication.
Definition: ldap_connect_auth.h:40
void ldap_auth_info_free(ldap_auth_info_t)
Dummy function for Manager.
Definition: ldap_connect_auth.c:442
ldap_auth_info_t ldap_auth_info_new(const gchar *, const gchar *, gboolean)
Dummy function for manager.
Definition: ldap_connect_auth.c:405