Page MenuHomeFreeBSD

D18514.id51866.diff
No OneTemporary

D18514.id51866.diff

Index: sbin/ping/ping.c
===================================================================
--- sbin/ping/ping.c
+++ sbin/ping/ping.c
@@ -85,6 +85,7 @@
#include <netipsec/ipsec.h>
#endif /*IPSEC*/
+#include <capsicum_helpers.h>
#include <ctype.h>
#include <err.h>
#include <errno.h>
@@ -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)

File Metadata

Mime Type
text/plain
Expires
Fri, Aug 21, 9:11 PM (31 m, 52 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37056178
Default Alt Text
D18514.id51866.diff (765 B)

Event Timeline