direct_api.h revision ee9827000137fed2d3300124115fc1572acafe2f
1/* Authors: Jason Tang <jtang@tresys.com>
2 *
3 * Copyright (C) 2004-2005 Tresys Technology, LLC
4 *
5 *  This library is free software; you can redistribute it and/or
6 *  modify it under the terms of the GNU Lesser General Public
7 *  License as published by the Free Software Foundation; either
8 *  version 2.1 of the License, or (at your option) any later version.
9 *
10 *  This library is distributed in the hope that it will be useful,
11 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 *  Lesser General Public License for more details.
14 *
15 *  You should have received a copy of the GNU Lesser General Public
16 *  License along with this library; if not, write to the Free Software
17 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18 */
19
20#ifndef _SEMANAGE_DIRECT_API_H_
21#define _SEMANAGE_DIRECT_API_H_
22
23/* Circular dependency */
24struct semanage_handle;
25
26/* Direct component of handle */
27struct semanage_direct_handle {
28
29	/* Locking */
30	int activelock_file_fd;
31	int translock_file_fd;
32};
33
34int semanage_direct_connect(struct semanage_handle *sh);
35
36int semanage_direct_is_managed(struct semanage_handle *sh);
37
38int semanage_direct_access_check(struct semanage_handle *sh);
39
40int semanage_direct_mls_enabled(struct semanage_handle *sh);
41
42#include <stdio.h>
43#include <unistd.h>
44ssize_t bunzip(struct semanage_handle *sh, FILE *f, char **data);
45
46#endif
47