From 7d9fcc2bf6869993e5f38d5eb183fb59e8a52816 Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Tue, 30 Dec 2014 09:09:41 +0100 Subject: bus: fix capabilities on big-endian The kernel provides capabilities as a u32 array, sd-bus uses an u8 array. This works fine on little-endian as both are encoded the same way. However, this fails on big-endian if we do not perform sufficient byte-swapping on each u32 entry. This patch makes sd-bus use u32, too. We avoid changing any kernel provided data so we can keep pointing into kdbus pool buffers which contain u32 arrays. --- src/libsystemd/sd-bus/bus-creds.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libsystemd/sd-bus/bus-creds.h') diff --git a/src/libsystemd/sd-bus/bus-creds.h b/src/libsystemd/sd-bus/bus-creds.h index 2480a4a0b1..3b337efa32 100644 --- a/src/libsystemd/sd-bus/bus-creds.h +++ b/src/libsystemd/sd-bus/bus-creds.h @@ -60,7 +60,7 @@ struct sd_bus_creds { char *user_unit; char *slice; - uint8_t *capability; + uint32_t *capability; uint32_t audit_session_id; uid_t audit_login_uid; -- cgit v1.2.3-54-g00ecf