Blame src/semanage_conf.h

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