VFS: add dupfrom(2) call
This call copies a file descriptor from a remote process into the calling process. The call is for the VND driver only, and in the future, ACLs will prevent any other process from using this call. Change-Id: Ib16fdd1f1a12cb38a70d7e441dad91bc86898f6d
This commit is contained in:
@@ -44,6 +44,7 @@ int mapdriver(char *label, int major, int style, int flags);
|
||||
pid_t getnpid(endpoint_t proc_ep);
|
||||
uid_t getnuid(endpoint_t proc_ep);
|
||||
gid_t getngid(endpoint_t proc_ep);
|
||||
int dupfrom(endpoint_t endpt, int fd);
|
||||
ssize_t pread64(int fd, void *buf, size_t count, u64_t where);
|
||||
ssize_t pwrite64(int fd, const void *buf, size_t count, u64_t where);
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
#define FSTAT 52
|
||||
#define LSTAT 53
|
||||
#define IOCTL 54
|
||||
#define DUPFROM 56
|
||||
#define FS_READY 57
|
||||
#define PIPE2 58
|
||||
#define EXEC 59
|
||||
|
||||
@@ -887,6 +887,10 @@
|
||||
#define VFS_PFS_FD m2_i3
|
||||
#define VFS_PFS_FILP m2_p1
|
||||
|
||||
/* Field names for the dupfrom(2) call. */
|
||||
#define VFS_DUPFROM_ENDPT m1_i1
|
||||
#define VFS_DUPFROM_FD m1_i2
|
||||
|
||||
/* Field names for GETRUSAGE related calls */
|
||||
#define RU_ENDPT m1_i1 /* indicates a process for sys_getrusage */
|
||||
#define RU_WHO m1_i1 /* who argument in getrusage call */
|
||||
|
||||
Reference in New Issue
Block a user