Don't allow a preopened file descriptor to be renamed over.

This is consistent with fd_close's behavior, and is likely temporary
until other options are designed.
This commit is contained in:
Dan Gohman
2019-04-23 12:41:16 -07:00
parent 7813cc9d2d
commit f10cd2f4b1
3 changed files with 20 additions and 1 deletions

View File

@@ -564,6 +564,7 @@ __wasi_errno_t wasmtime_ssp_fd_read(
__wasi_errno_t wasmtime_ssp_fd_renumber(
#if !defined(WASMTIME_SSP_STATIC_CURFDS)
struct fd_table *curfds,
struct fd_prestats *prestats,
#endif
__wasi_fd_t from,
__wasi_fd_t to