Index: sbin/ping/ping.c =================================================================== --- sbin/ping/ping.c +++ sbin/ping/ping.c @@ -85,6 +85,7 @@ #include #endif /*IPSEC*/ +#include #include #include #include @@ -714,8 +715,11 @@ * namespaces (e.g filesystem) is restricted (see capsicum(4)). * We must connect(2) our socket before this point. */ - if (cansandbox && cap_enter() < 0 && errno != ENOSYS) - err(1, "cap_enter"); + if (cansandbox) { + caph_cache_catpages(); + if (cap_enter() < 0 && errno != ENOSYS) + err(1, "cap_enter"); + } cap_rights_init(&rights, CAP_RECV, CAP_EVENT, CAP_SETSOCKOPT); if (cap_rights_limit(srecv, &rights) < 0 && errno != ENOSYS)