Skip to content

dbus-daemon test: Don't test fd limits if in an unprivileged container

Simon McVittie requested to merge smcv/dbus:unprivileged-container into master

In an unprivileged container, uid 0 doesn't have CAP_SYS_RESOURCE, so we can't expect the dbus-daemon to be able to escalate its fd limit.

This can be reproduced using bubblewrap:

sudo bwrap \
    --cap-drop CAP_SYS_RESOURCE \
    --ro-bind / / \
    --dev /dev \
env \
    DBUS_TEST_DAEMON=.../bus/dbus-daemon \
    DBUS_TEST_DATA=.../test/data \
.../test/test-dbus-daemon \
    -p /fd-limit \
    --verbose

Bug-Debian: https://bugs.debian.org/908092

Merge request reports