chiark / gitweb /
selinux-access: fix broken ternary operator
authorLukas Nykryn <lnykryn@redhat.com>
Fri, 21 Nov 2014 16:02:15 +0000 (17:02 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 21 Nov 2014 20:23:39 +0000 (21:23 +0100)
it seems to be a typo introduced by ebcf1f97de4f6b1580ae55eb56b1a3939fe6b602
-                _r = selinux_access_check(_b, _m, _u->source_path ?:_u->fragment_path, (permission), &_error); \
+        ({ Unit *_unit = (unit); selinux_generic_access_check(bus,message, _unit->fragment_path ?: _unit->fragment_path, permission,error); })

src/core/selinux-access.h

index bccf0d2..dd1e8bb 100644 (file)
@@ -40,7 +40,7 @@ int mac_selinux_unit_access_check_strv(char **units, sd_bus_message *message, Ma
 #define mac_selinux_unit_access_check(unit, message, permission, error) \
         ({                                                              \
                 Unit *_unit = (unit);                                   \
-                mac_selinux_generic_access_check((message), _unit->fragment_path ?: _unit->fragment_path, (permission), (error)); \
+                mac_selinux_generic_access_check((message), _unit->source_path ?: _unit->fragment_path, (permission), (error)); \
         })
 
 #else