]> git.ipfire.org Git - thirdparty/systemd.git/blame - udev_selinux.h
volume_id: fix Makefile for parallel make
[thirdparty/systemd.git] / udev_selinux.h
CommitLineData
fbda4a34 1/*
fbda4a34
KS
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.,
27b77df4 15 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
fbda4a34
KS
16 *
17 */
18#ifndef _UDEV_SELINUX_H
19#define _UDEV_SELINUX_H
20
21#ifdef USE_SELINUX
22
23extern void selinux_setfilecon(const char *file, const char *devname, unsigned int mode);
24extern void selinux_setfscreatecon(const char *file, const char *devname, unsigned int mode);
4d772639 25extern void selinux_resetfscreatecon(void);
fbda4a34 26extern void selinux_init(void);
4d772639 27extern void selinux_exit(void);
fbda4a34
KS
28
29#else
30
31static inline void selinux_setfilecon(const char *file, const char *devname, unsigned int mode) {}
32static inline void selinux_setfscreatecon(const char *file, const char *devname, unsigned int mode) {}
4d772639 33static inline void selinux_resetfscreatecon(void) {}
fbda4a34 34static inline void selinux_init(void) {}
4d772639 35static inline void selinux_exit(void) {}
fbda4a34
KS
36
37#endif /* USE_SELINUX */
38#endif /* _UDEV_USE_SELINUX */