2011-12-20 08:55:13 -05:00
|
|
|
/*
|
2014-01-23 14:52:54 -07:00
|
|
|
* Copyright (c) 2011-2014 Todd C. Miller <Todd.Miller@courtesan.com>
|
2011-12-20 08:55:13 -05:00
|
|
|
*
|
|
|
|
* Permission to use, copy, modify, and distribute this software for any
|
|
|
|
* purpose with or without fee is hereby granted, provided that the above
|
|
|
|
* copyright notice and this permission notice appear in all copies.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
|
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
|
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
|
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
|
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
|
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
|
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _SUDO_CONF_H
|
|
|
|
#define _SUDO_CONF_H
|
|
|
|
|
2014-07-21 14:37:27 -06:00
|
|
|
#include "sudo_queue.h"
|
2011-12-20 08:55:13 -05:00
|
|
|
|
2013-01-27 13:53:11 -05:00
|
|
|
#define GROUP_SOURCE_ADAPTIVE 0
|
|
|
|
#define GROUP_SOURCE_STATIC 1
|
|
|
|
#define GROUP_SOURCE_DYNAMIC 2
|
|
|
|
|
2014-10-22 13:20:32 -06:00
|
|
|
struct sudo_debug_file;
|
|
|
|
TAILQ_HEAD(sudo_conf_debug_file_list, sudo_debug_file);
|
|
|
|
|
2011-12-20 08:55:13 -05:00
|
|
|
struct plugin_info {
|
2013-10-22 09:00:37 -06:00
|
|
|
TAILQ_ENTRY(plugin_info) entries;
|
2014-10-22 13:20:32 -06:00
|
|
|
struct sudo_conf_debug_file_list debug_files;
|
2011-12-20 08:55:13 -05:00
|
|
|
const char *path;
|
|
|
|
const char *symbol_name;
|
2012-03-15 12:32:31 -04:00
|
|
|
char * const * options;
|
2014-10-22 13:20:32 -06:00
|
|
|
unsigned int lineno;
|
2011-12-20 08:55:13 -05:00
|
|
|
};
|
2013-10-22 09:00:37 -06:00
|
|
|
TAILQ_HEAD(plugin_info_list, plugin_info);
|
2011-12-20 08:55:13 -05:00
|
|
|
|
2014-10-22 13:20:32 -06:00
|
|
|
struct sudo_conf_debug {
|
|
|
|
TAILQ_ENTRY(sudo_conf_debug) entries;
|
|
|
|
struct sudo_conf_debug_file_list debug_files;
|
|
|
|
char *progname;
|
|
|
|
};
|
|
|
|
TAILQ_HEAD(sudo_conf_debug_list, sudo_conf_debug);
|
|
|
|
|
2011-12-20 08:55:13 -05:00
|
|
|
/* Read main sudo.conf file. */
|
2014-07-22 11:26:17 -06:00
|
|
|
__dso_public void sudo_conf_read_v1(const char *conf_file);
|
|
|
|
#define sudo_conf_read(_a) sudo_conf_read_v1((_a))
|
2011-12-20 08:55:13 -05:00
|
|
|
|
|
|
|
/* Accessor functions. */
|
2014-07-22 11:26:17 -06:00
|
|
|
__dso_public const char *sudo_conf_askpass_path_v1(void);
|
|
|
|
__dso_public const char *sudo_conf_sesh_path_v1(void);
|
|
|
|
__dso_public const char *sudo_conf_noexec_path_v1(void);
|
|
|
|
__dso_public const char *sudo_conf_plugin_dir_path_v1(void);
|
2014-10-22 13:20:32 -06:00
|
|
|
__dso_public struct sudo_conf_debug_list *sudo_conf_debugging_v1(void);
|
2014-07-22 11:26:17 -06:00
|
|
|
__dso_public struct plugin_info_list *sudo_conf_plugins_v1(void);
|
|
|
|
__dso_public bool sudo_conf_disable_coredump_v1(void);
|
|
|
|
__dso_public bool sudo_conf_probe_interfaces_v1(void);
|
|
|
|
__dso_public int sudo_conf_group_source_v1(void);
|
|
|
|
__dso_public int sudo_conf_max_groups_v1(void);
|
|
|
|
#define sudo_conf_askpass_path() sudo_conf_askpass_path_v1()
|
|
|
|
#define sudo_conf_sesh_path() sudo_conf_sesh_path_v1()
|
|
|
|
#define sudo_conf_noexec_path() sudo_conf_noexec_path_v1()
|
|
|
|
#define sudo_conf_plugin_dir_path() sudo_conf_plugin_dir_path_v1()
|
2014-10-22 13:20:32 -06:00
|
|
|
#define sudo_conf_debugging() sudo_conf_debugging_v1()
|
2014-07-22 11:26:17 -06:00
|
|
|
#define sudo_conf_plugins() sudo_conf_plugins_v1()
|
|
|
|
#define sudo_conf_disable_coredump() sudo_conf_disable_coredump_v1()
|
|
|
|
#define sudo_conf_probe_interfaces() sudo_conf_probe_interfaces_v1()
|
|
|
|
#define sudo_conf_group_source() sudo_conf_group_source_v1()
|
|
|
|
#define sudo_conf_max_groups() sudo_conf_max_groups_v1()
|
2011-12-20 08:55:13 -05:00
|
|
|
|
|
|
|
#endif /* _SUDO_CONF_H */
|