summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/bus-creds.h
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2014-12-30 09:09:41 +0100
committerDavid Herrmann <dh.herrmann@gmail.com>2014-12-30 09:09:41 +0100
commit7d9fcc2bf6869993e5f38d5eb183fb59e8a52816 (patch)
treec891ab50009613299173845bcce0cea428bc08f3 /src/libsystemd/sd-bus/bus-creds.h
parent34a5d5e52661212c7a145cbab45e70a6df7ba284 (diff)
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.
Diffstat (limited to 'src/libsystemd/sd-bus/bus-creds.h')
-rw-r--r--src/libsystemd/sd-bus/bus-creds.h2
1 files changed, 1 insertions, 1 deletions
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;