Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F167319198
D18514.id51866.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
765 B
Referenced Files
None
Subscribers
None
D18514.id51866.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D18514: Use caph_cache_catpages() in ping(8).
Attached
Detach File
Event Timeline
Log In to Comment