aboutsummaryrefslogtreecommitdiff
path: root/src/rc/rc-selinux.h
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2015-03-25 00:57:05 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2015-03-25 01:01:38 -0500
commita4cf61e8bf827dc405a547c314e840dab11fc979 (patch)
tree7a9d9c900ec5dd0940159e7e9a13bb22148f800a /src/rc/rc-selinux.h
parentd38cc8f2210e839c4935208917138e4809ece758 (diff)
selinux: unconditionally include the header and provide stub methods
If selinux is disabled, then stub methods will be provided instead of calling the real methods. This removes some warnings about unused parameters which used to be covered up with #ifdef HAVE_SELINUX. Signed-off-by: Jason Zaman <jason@perfinion.com>
Diffstat (limited to 'src/rc/rc-selinux.h')
-rw-r--r--src/rc/rc-selinux.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/rc/rc-selinux.h b/src/rc/rc-selinux.h
index e28f3339..039890b7 100644
--- a/src/rc/rc-selinux.h
+++ b/src/rc/rc-selinux.h
@@ -26,10 +26,24 @@
#ifndef RC_SELINUX_UTIL_H
#define RC_SELINUX_UTIL_H
+#ifdef HAVE_SELINUX
+
int selinux_util_open(void);
int selinux_util_label(const char *path);
int selinux_util_close(void);
void selinux_setup(char **argv);
+#else
+
+/* always return false for selinux_util_open() */
+#define selinux_util_open() (0)
+#define selinux_util_label(x) do { } while(0)
+#define selinux_util_close() do { } while(0)
+
+#define selinux_setup(x) do { } while(0)
+
+#endif
+
+
#endif