diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-11-25 13:21:23 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-11-25 14:28:34 +0100 |
commit | 0258159049d5b381c6097533a69a1b29c3ba7ce2 (patch) | |
tree | 6402f484b4e23e5c7dcd8d57010572cd9c16c56d /src/libsystemd/sd-bus/bus-dump.c | |
parent | 2e9efd22ce0099c3b4d35898d70f8fc706c8a66c (diff) |
sd-bus: add supplementary groups list to creds object
Diffstat (limited to 'src/libsystemd/sd-bus/bus-dump.c')
-rw-r--r-- | src/libsystemd/sd-bus/bus-dump.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/libsystemd/sd-bus/bus-dump.c b/src/libsystemd/sd-bus/bus-dump.c index d6e5546053..2ddf016a95 100644 --- a/src/libsystemd/sd-bus/bus-dump.c +++ b/src/libsystemd/sd-bus/bus-dump.c @@ -384,8 +384,18 @@ int bus_creds_dump(sd_bus_creds *c, FILE *f, bool terse) { if (c->mask & SD_BUS_CREDS_FSGID) fprintf(f, "%sFSGID=%s"GID_FMT"%s", prefix, color, c->fsgid, suffix); + if (c->mask & SD_BUS_CREDS_SUPPLEMENTARY_GIDS) { + unsigned i; + + fprintf(f, "%sSupplementaryGIDs=%s", prefix, color); + for (i = 0; i < c->n_supplementary_gids; i++) + fprintf(f, "%s" GID_FMT, i > 0 ? " " : "", c->supplementary_gids[i]); + fprintf(f, "%s", suffix); + } + if (terse && ((c->mask & (SD_BUS_CREDS_UID|SD_BUS_CREDS_EUID|SD_BUS_CREDS_SUID|SD_BUS_CREDS_FSUID| - SD_BUS_CREDS_GID|SD_BUS_CREDS_EGID|SD_BUS_CREDS_SGID|SD_BUS_CREDS_FSGID)) || r >= 0)) + SD_BUS_CREDS_GID|SD_BUS_CREDS_EGID|SD_BUS_CREDS_SGID|SD_BUS_CREDS_FSGID| + SD_BUS_CREDS_SUPPLEMENTARY_GIDS)) || r >= 0)) fputs("\n", f); if (c->mask & SD_BUS_CREDS_COMM) |