source code open - smack
[framework/security/smack.git] / utils / common.h
1 /*
2  * This file is part of libsmack.
3  *
4  * Copyright (C) 2011 Intel Corporation
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public License
8  * version 2.1 as published by the Free Software Foundation.
9  *
10  * This library is distributed in the hope that it will be useful, but
11  * 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
18  * 02110-1301 USA
19  *
20  * Authors:
21  * Brian McGillion <brian.mcgillion@intel.com>
22  * Jarkko Sakkinen <jarkko.sakkinen@intel.com>
23  */
24
25 #ifndef COMMON_H
26 #define COMMON_H
27
28 #define SMACKFS_MNT "/smack"
29 #define ACCESSES_D_PATH "/etc/smack/accesses.d"
30 #define CIPSO_D_PATH "/etc/smack/cipso.d"
31
32 int clear(void);
33 int is_smackfs_mounted(void);
34 int apply_rules(const char *path, int clear);
35 int apply_cipso(const char *path);
36 int apply_rules_file(int fd, int clear);
37 int apply_cipso_file(int fd);
38
39 #endif // COMMON_H