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 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); 25extern void selinux_resetfscreatecon(void); 26extern void selinux_init(void); 27extern void selinux_exit(void); 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) {} 33static inline void selinux_resetfscreatecon(void) {} 34static inline void selinux_init(void) {} 35static inline void selinux_exit(void) {} 36 37#endif /* USE_SELINUX */ 38#endif /* _UDEV_USE_SELINUX */ 39