chiark / gitweb /
man: fix udevmonitor text
[elogind.git] / udev_selinux.h
1 /*
2  * Copyright (C) 2004 Daniel Walsh
3  *
4  *      This program is free software; you can redistribute it and/or modify it
5  *      under the terms of the GNU General Public License as published by the
6  *      Free Software Foundation version 2 of the License.
7  * 
8  *      This program is distributed in the hope that it will be useful, but
9  *      WITHOUT ANY WARRANTY; without even the implied warranty of
10  *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11  *      General Public License for more details.
12  * 
13  *      You should have received a copy of the GNU General Public License along
14  *      with this program; if not, write to the Free Software Foundation, Inc.,
15  *      51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
16  *
17  */
18 #ifndef _UDEV_SELINUX_H
19 #define _UDEV_SELINUX_H
20
21 #ifdef USE_SELINUX
22
23 extern void selinux_setfilecon(const char *file, const char *devname, unsigned int mode);
24 extern void selinux_setfscreatecon(const char *file, const char *devname, unsigned int mode);
25 extern void selinux_resetfscreatecon(void);
26 extern void selinux_init(void);
27 extern void selinux_exit(void);
28
29 #else
30
31 static inline void selinux_setfilecon(const char *file, const char *devname, unsigned int mode) {}
32 static inline void selinux_setfscreatecon(const char *file, const char *devname, unsigned int mode) {}
33 static inline void selinux_resetfscreatecon(void) {}
34 static inline void selinux_init(void) {}
35 static inline void selinux_exit(void) {}
36
37 #endif /* USE_SELINUX */
38 #endif /* _UDEV_USE_SELINUX */