OpenVAS Libraries
4.0+rc3.SVN
|
00001 /* OpenVAS Libraries 00002 * $Id$ 00003 * Description: Header for LDAP/ADS Authentication module. 00004 * 00005 * Authors: 00006 * Felix Wolfsteller <felix.wolfsteller@intevation.de> 00007 * 00008 * Copyright: 00009 * Copyright (C) 2010 Greenbone Networks GmbH 00010 * 00011 * This program is free software; you can redistribute it and/or modify 00012 * it under the terms of the GNU General Public License version 2, 00013 * or, at your option, any later version as published by the Free 00014 * Software Foundation 00015 * 00016 * This program is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU General Public License for more details. 00020 * 00021 * You should have received a copy of the GNU General Public License 00022 * along with this program; if not, write to the Free Software 00023 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 00024 */ 00025 00026 #ifndef ENABLE_LDAP_AUTH 00027 // Handle cases where openldap is not available. 00028 #endif 00029 00030 #ifndef ADS_AUTH_H 00031 #define ADS_AUTH_H 00032 00033 #include "ldap_auth.h" 00034 00035 #include <glib.h> 00036 00043 struct ads_auth_info 00044 { 00045 ldap_auth_info_t ldap_auth_conf; 00046 gchar* domain; 00047 gchar* domain_dc; 00048 }; 00049 00051 typedef struct ads_auth_info *ads_auth_info_t; 00052 00053 ads_auth_info_t 00054 ads_auth_info_from_key_file (GKeyFile * key_file, const gchar * group); 00055 00056 void 00057 ads_auth_info_free (ads_auth_info_t info); 00058 00059 int ads_authenticate (const gchar * username, const gchar * password, 00060 /*ads_auth_info_t */ void *info); 00061 00062 GSList* ads_auth_bind_query (const gchar* host, 00063 const char* domain, 00064 const char* dn, 00065 const gchar* username, 00066 const gchar* password, 00067 const gchar* filter, 00068 const gchar* attribute); 00069 00070 #endif /* not ADS_AUTH_H */