]> git.ipfire.org Git - thirdparty/systemd.git/blob - udev_selinux.h
path_id: add support for iSCSI devices
[thirdparty/systemd.git] / udev_selinux.h
1 /*
2 * udev_selinux.h
3 *
4 * Copyright (C) 2004 Daniel Walsh
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation version 2 of the License.
9 *
10 * This program 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 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 675 Mass Ave, Cambridge, MA 02139, USA.
18 *
19 */
20 #ifndef _UDEV_SELINUX_H
21 #define _UDEV_SELINUX_H
22
23 #ifdef USE_SELINUX
24
25 extern void selinux_setfilecon(const char *file, const char *devname, unsigned int mode);
26 extern void selinux_setfscreatecon(const char *file, const char *devname, unsigned int mode);
27 extern void selinux_resetfscreatecon(void);
28 extern void selinux_init(void);
29 extern void selinux_exit(void);
30
31 #else
32
33 static inline void selinux_setfilecon(const char *file, const char *devname, unsigned int mode) {}
34 static inline void selinux_setfscreatecon(const char *file, const char *devname, unsigned int mode) {}
35 static inline void selinux_resetfscreatecon(void) {}
36 static inline void selinux_init(void) {}
37 static inline void selinux_exit(void) {}
38
39 #endif /* USE_SELINUX */
40 #endif /* _UDEV_USE_SELINUX */