Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177837905
D38856.1795400085.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
728 B
Referenced Files
None
Subscribers
None
D38856.1795400085.diff
View Options
diff --git a/usr.sbin/bhyve/snapshot.c b/usr.sbin/bhyve/snapshot.c
--- a/usr.sbin/bhyve/snapshot.c
+++ b/usr.sbin/bhyve/snapshot.c
@@ -1517,6 +1517,9 @@
int socket_fd;
pthread_t checkpoint_pthread;
int err;
+#ifndef WITHOUT_CAPSICUM
+ cap_rights_t rights;
+#endif
memset(&addr, 0, sizeof(addr));
@@ -1547,6 +1550,13 @@
goto fail;
}
+#ifndef WITHOUT_CAPSICUM
+ cap_rights_init(&rights, CAP_ACCEPT, CAP_READ, CAP_RECV, CAP_WRITE,
+ CAP_SEND, CAP_GETSOCKOPT);
+
+ if (caph_rights_limit(socket_fd, &rights) == -1)
+ errx(EX_OSERR, "Unable to apply rights for sandbox");
+#endif
checkpoint_info = calloc(1, sizeof(*checkpoint_info));
checkpoint_info->ctx = ctx;
checkpoint_info->socket_fd = socket_fd;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 23, 2:14 AM (1 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41920610
Default Alt Text
D38856.1795400085.diff (728 B)
Attached To
Mode
D38856: bhyve: [snapshot] Add cap limits for ipc socket
Attached
Detach File
Event Timeline