Problem
While /etc is shared with the sandbox, on Ubuntu 24.04 using systemd the /etc/resolv.conf is a symlink to /run/systemd/resolve/stub-resolv.conf, which is not bind mounted in the sandbox resulting with no network access.
Proposed solution
I added this config entry to make it work:
# Network access
EXTRA_RO_BINDS+=( "/run/systemd/resolve" )
Alternatives considered
Should it be added dynamically by ai-bwrap as soon as $SHARE_NET is true and /run/systemd/resolve exists on the host?
Great wrapper BTW! Thank you.
Problem
While
/etcis shared with the sandbox, on Ubuntu 24.04 using systemd the/etc/resolv.confis a symlink to/run/systemd/resolve/stub-resolv.conf, which is not bind mounted in the sandbox resulting with no network access.Proposed solution
I added this config entry to make it work:
Alternatives considered
Should it be added dynamically by
ai-bwrapas soon as$SHARE_NETistrueand/run/systemd/resolveexists on the host?Great wrapper BTW! Thank you.