OpenVAS Libraries
4.0+rc3.SVN
|
00001 /* OpenVAS Libraries 00002 * $Id$ 00003 * Description: Header for authentication mechanism(s). 00004 * 00005 * Authors: 00006 * Matthew Mundell <matt@mundell.ukfsn.org> 00007 * Michael Wiegand <michael.wiegand@greenbone.net> 00008 * Felix Wolfsteller <felix.wolfsteller@intevation.de> 00009 * 00010 * Copyright: 00011 * Copyright (C) 2009,2010 Greenbone Networks GmbH 00012 * 00013 * This program is free software; you can redistribute it and/or 00014 * modify it under the terms of the GNU General Public License 00015 * as published by the Free Software Foundation; either version 2 00016 * of the License, or (at your option) any later version. 00017 * 00018 * This program is distributed in the hope that it will be useful, 00019 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00021 * GNU General Public License for more details. 00022 * 00023 * You should have received a copy of the GNU General Public License 00024 * along with this program; if not, write to the Free Software 00025 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 00026 * USA. 00027 */ 00028 00029 #ifndef _OPENVAS_AUTH_H 00030 #define _OPENVAS_AUTH_H 00031 00032 #include <glib.h> 00033 00034 void openvas_auth_init (); 00035 00036 void openvas_auth_tear_down (); 00037 00038 int openvas_auth_write_config (GKeyFile * keyfile); 00039 00040 gchar *get_password_hashes (int, const gchar *); 00041 00042 gchar *digest_hex (int, const guchar *); 00043 00044 int openvas_authenticate (const gchar *, const gchar *); 00045 00046 int openvas_authenticate_uuid (const gchar *, const gchar *, gchar ** uuid); 00047 00048 gchar *openvas_user_uuid (const char *name); 00049 00050 int openvas_is_user_admin (const gchar *); 00051 00052 int openvas_set_user_role (const gchar *, const gchar *, 00053 const gchar * user_dir_name); 00054 00055 int openvas_auth_mkrulesdir (const gchar * user_dir_name); 00056 00057 int openvas_auth_user_rules (const gchar * username, gchar ** rules); 00058 00059 int openvas_auth_user_uuid_rules (const gchar * username, 00060 const gchar * user_uuid, gchar ** rules); 00061 00062 int openvas_auth_store_user_rules (const gchar * user_dir, const gchar * hosts, 00063 int hosts_allow); 00064 00065 #endif /* not _OPENVAS_AUTH_H */