From: Michael Tremer Date: Sun, 17 Sep 2023 19:39:51 +0000 (+0000) Subject: jail: Don't abort if /etc/hosts or /etc/resolv.conf cannot be bind-mounted X-Git-Tag: 0.9.30~1689 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=693a979a5d270ccefe663f35f51715ddea01fb03;p=pakfire.git jail: Don't abort if /etc/hosts or /etc/resolv.conf cannot be bind-mounted Signed-off-by: Michael Tremer --- diff --git a/src/libpakfire/jail.c b/src/libpakfire/jail.c index 40ea2348a..2ffca2b2f 100644 --- a/src/libpakfire/jail.c +++ b/src/libpakfire/jail.c @@ -1285,8 +1285,17 @@ static int pakfire_jail_mount_networking(struct pakfire_jail* jail) { // Bind-mount all paths read-only for (const char** path = paths; *path; path++) { r = pakfire_bind(jail->pakfire, *path, NULL, MS_RDONLY); - if (r) + if (r) { + switch (errno) { + // Ignore if we don't have permission + case EPERM: + continue; + + default: + break; + } return r; + } } return 0;