OpenVAS Libraries  6.0+beta5
ads_auth.h
Go to the documentation of this file.
1 /* OpenVAS Libraries
2  * $Id$
3  * Description: Header for LDAP/ADS Authentication module.
4  *
5  * Authors:
6  * Felix Wolfsteller <felix.wolfsteller@intevation.de>
7  *
8  * Copyright:
9  * Copyright (C) 2010 Greenbone Networks GmbH
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License version 2,
13  * or, at your option, any later version as published by the Free
14  * Software Foundation
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 ENABLE_LDAP_AUTH
27 // Handle cases where openldap is not available.
28 #endif
29 
30 #ifndef ADS_AUTH_H
31 #define ADS_AUTH_H
32 
33 #include "ldap_auth.h"
34 
35 #include <glib.h>
36 
44 {
45  ldap_auth_info_t ldap_auth_conf;
46  gchar* domain;
47  gchar* domain_dc;
48 };
49 
52 
53 ads_auth_info_t
54 ads_auth_info_from_key_file (GKeyFile * key_file, const gchar * group);
55 
56 void
57 ads_auth_info_free (ads_auth_info_t info);
58 
59 int ads_authenticate (const gchar * username, const gchar * password,
60  /*ads_auth_info_t */ void *info);
61 
62 GSList* ads_auth_bind_query (const gchar* host,
63  const char* domain,
64  const char* dn,
65  const gchar* username,
66  const gchar* password,
67  const gchar* filter,
68  const gchar* attribute);
69 
70 #endif /* not ADS_AUTH_H */