summaryrefslogtreecommitdiff
path: root/src/core/selinux-access.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-05-14 22:44:45 +0200
committerLennart Poettering <lennart@poettering.net>2014-05-14 22:58:43 +0200
commit4f4f70361a64957c45a2d8f40bfb04c77b454697 (patch)
tree08ae051d5f915b3603a315a90a52497fccab6368 /src/core/selinux-access.h
parent04552566fa357d3029f06b66690dc28752522e10 (diff)
core: no need to pass bus object to selinux access check calls anymore
Diffstat (limited to 'src/core/selinux-access.h')
-rw-r--r--src/core/selinux-access.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/core/selinux-access.h b/src/core/selinux-access.h
index 9e89064819..27d9e14591 100644
--- a/src/core/selinux-access.h
+++ b/src/core/selinux-access.h
@@ -27,18 +27,22 @@
void selinux_access_free(void);
-int selinux_generic_access_check(sd_bus *bus, sd_bus_message *message, const char *path, const char *permission, sd_bus_error *error);
+int selinux_generic_access_check(sd_bus_message *message, const char *path, const char *permission, sd_bus_error *error);
#ifdef HAVE_SELINUX
-#define selinux_access_check(bus, message, permission, error) \
- selinux_generic_access_check(bus, message, NULL, permission, error)
-#define selinux_unit_access_check(unit, bus, message, permission, error) \
- ({ Unit *_unit = (unit); selinux_generic_access_check(bus, message, _unit->fragment_path ?: _unit->fragment_path, permission, error); })
+#define selinux_access_check(message, permission, error) \
+ selinux_generic_access_check((message), NULL, (permission), (error))
+
+#define selinux_unit_access_check(unit, message, permission, error) \
+ ({ \
+ Unit *_unit = (unit); \
+ selinux_generic_access_check((message), _unit->fragment_path ?: _unit->fragment_path, (permission), (error)); \
+ })
#else
-#define selinux_access_check(bus, message, permission, error) 0
-#define selinux_unit_access_check(unit, bus, message, permission, error) 0
+#define selinux_access_check(message, permission, error) 0
+#define selinux_unit_access_check(unit, message, permission, error) 0
#endif