From 34a5d5e52661212c7a145cbab45e70a6df7ba284 Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Tue, 30 Dec 2014 08:42:53 +0100 Subject: bus: drop creds->capability_size The number of available caps can be read from /proc/sys/kernel/cap_last_cap during runtime. Our helper cap_last_cap() does that, so there's no reason to remember the size of any capability cache. We can just pre-allocate arrays with a suitable size for all available caps and reject any higher caps. The kernel capability API uses u32 as base so make sure we do the same. Note that this is specified by POSIX, so it's unlikely to change. --- src/libsystemd/sd-bus/bus-creds.h | 1 - 1 file changed, 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 48453e2afd..2480a4a0b1 100644 --- a/src/libsystemd/sd-bus/bus-creds.h +++ b/src/libsystemd/sd-bus/bus-creds.h @@ -61,7 +61,6 @@ struct sd_bus_creds { char *slice; uint8_t *capability; - size_t capability_size; uint32_t audit_session_id; uid_t audit_login_uid; -- cgit v1.2.3-54-g00ecf