Blame src/semanage_conf.h

Packit 366192
/* Authors: Jason Tang <jtang@tresys.com>
Packit 366192
 *
Packit 366192
 * Copyright (C) 2004-2005 Tresys Technology, LLC
Packit 366192
 *
Packit 366192
 *  This library is free software; you can redistribute it and/or
Packit 366192
 *  modify it under the terms of the GNU Lesser General Public
Packit 366192
 *  License as published by the Free Software Foundation; either
Packit 366192
 *  version 2.1 of the License, or (at your option) any later version.
Packit 366192
 *
Packit 366192
 *  This library is distributed in the hope that it will be useful,
Packit 366192
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 366192
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 366192
 *  Lesser General Public License for more details.
Packit 366192
 *
Packit 366192
 *  You should have received a copy of the GNU Lesser General Public
Packit 366192
 *  License along with this library; if not, write to the Free Software
Packit 366192
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
Packit 366192
 */
Packit 366192
Packit 366192
#ifndef SEMANAGE_CONF_H
Packit 366192
#define SEMANAGE_CONF_H
Packit 366192
Packit 366192
#include <semanage/handle.h>
Packit 366192
#include <sys/types.h>
Packit 366192
#include <sys/stat.h>
Packit 366192
Packit 366192
/* libsemanage has its own configuration file.	It has two main parts:
Packit 366192
 *  - single options
Packit 366192
 *  - external programs to execute whenever a policy is to be loaded
Packit 366192
 */
Packit 366192
Packit 366192
typedef struct semanage_conf {
Packit 366192
	enum semanage_connect_type store_type;
Packit 366192
	char *store_path;	/* used for both socket path and policy dir */
Packit 366192
	char *compiler_directory_path;
Packit 366192
	int server_port;
Packit 366192
	int policyvers;		/* version for server generated policies */
Packit 366192
	int target_platform;
Packit 366192
	int expand_check;
Packit 366192
	int save_previous;
Packit 366192
	int save_linked;
Packit 366192
	int disable_genhomedircon;
Packit 366192
	int usepasswd;
Packit 366192
	int handle_unknown;
Packit 366192
	mode_t file_mode;
Packit 366192
	int bzip_blocksize;
Packit 366192
	int bzip_small;
Packit 366192
	int remove_hll;
Packit 366192
	int ignore_module_cache;
Packit 366192
	char *ignoredirs;	/* ";" separated of list for genhomedircon to ignore */
Packit 366192
	struct external_prog *load_policy;
Packit 366192
	struct external_prog *setfiles;
Packit 366192
	struct external_prog *sefcontext_compile;
Packit 366192
	struct external_prog *mod_prog, *linked_prog, *kernel_prog;
Packit 366192
	char *store_root_path;
Packit 366192
} semanage_conf_t;
Packit 366192
Packit 366192
/* A linked list of verification programs.  Each one is called in
Packit 366192
 * order of appearance within the configuration file.
Packit 366192
 */
Packit 366192
typedef struct external_prog {
Packit 366192
	char *path;
Packit 366192
	char *args;
Packit 366192
	struct external_prog *next;
Packit 366192
} external_prog_t;
Packit 366192
Packit 366192
semanage_conf_t *semanage_conf_parse(const char *config_filename);
Packit 366192
void semanage_conf_destroy(semanage_conf_t * conf);
Packit 366192
Packit 366192
#endif