'mkdirat()' ignores the parameter 'mode'
Daksh-10 opened this issue · 2 comments
Daksh-10 commented
When we call mkdirat()
it calls mkdir()
https://github.com/WebAssembly/wasi-libc/blob/main/libc-bottom-half/sources/at_fdcwd.c#L47
And 'mkdir()' ignores mode
https://github.com/WebAssembly/wasi-libc/blob/main/libc-bottom-half/sources/posix.c#L221
So, it does take 'mode' parameter from the developer, but it doesn't set the mode for the file.
yamt commented
mkdir/mkdirat takes "mode" because it's a standard api.
it's ignored because wasi doesn't have the corresponding concept.
ie. it's expected.
Daksh-10 commented
Ok, so while compiling WASM through WASI, we can't change the mode (because of sandbox environment behaviour). So, we should not change the behaviour ?