Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F167929497
D3260.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
936 B
Referenced Files
None
Subscribers
None
D3260.id.diff
View Options
Index: head/sys/compat/cloudabi/cloudabi_fd.c
===================================================================
--- head/sys/compat/cloudabi/cloudabi_fd.c
+++ head/sys/compat/cloudabi/cloudabi_fd.c
@@ -30,6 +30,7 @@
#include <sys/capsicum.h>
#include <sys/filedesc.h>
#include <sys/proc.h>
+#include <sys/mman.h>
#include <sys/socketvar.h>
#include <sys/syscallsubr.h>
#include <sys/sysproto.h>
@@ -97,11 +98,16 @@
cloudabi_sys_fd_create1(struct thread *td,
struct cloudabi_sys_fd_create1_args *uap)
{
+ struct filecaps fcaps = {};
struct socket_args socket_args = {
.domain = AF_UNIX,
};
switch (uap->type) {
+ case CLOUDABI_FILETYPE_SHARED_MEMORY:
+ cap_rights_init(&fcaps.fc_rights, CAP_FSTAT, CAP_FTRUNCATE,
+ CAP_MMAP_RWX);
+ return (kern_shm_open(td, SHM_ANON, O_RDWR, 0, &fcaps));
case CLOUDABI_FILETYPE_SOCKET_DGRAM:
socket_args.type = SOCK_DGRAM;
return (sys_socket(td, &socket_args));
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Aug 26, 11:48 AM (5 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37293021
Default Alt Text
D3260.id.diff (936 B)
Attached To
Mode
D3260: Allow CloudABI processes to create shared memory objects.
Attached
Detach File
Event Timeline
Log In to Comment