From: Yu Watanabe Date: Wed, 15 Nov 2023 18:37:24 +0000 (+0900) Subject: sd-bus: drop SD_BUS_CREDS_AUGMENT flag X-Git-Tag: v255-rc3~53^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02dd646b16c2c1339197f69e96d2395c7d5357a8;p=thirdparty%2Fsystemd.git sd-bus: drop SD_BUS_CREDS_AUGMENT flag On checking if the message has enough credentials, the special flag needs to be dropped. Fixes a bug introduced by 705a415f684f8e9ee19983e5859de00bbb1477cb. --- diff --git a/src/libsystemd/sd-bus/bus-convenience.c b/src/libsystemd/sd-bus/bus-convenience.c index 81892c3254c..989e577de57 100644 --- a/src/libsystemd/sd-bus/bus-convenience.c +++ b/src/libsystemd/sd-bus/bus-convenience.c @@ -655,7 +655,7 @@ _public_ int sd_bus_query_sender_creds(sd_bus_message *call, uint64_t mask, sd_b c = sd_bus_message_get_creds(call); /* All data we need? */ - if (c && (mask & ~c->mask) == 0) { + if (c && (mask & ~SD_BUS_CREDS_AUGMENT & ~c->mask) == 0) { *ret = sd_bus_creds_ref(c); return 0; }