Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'mkdirat()' ignores the parameter 'mode' #527

Open
Daksh-10 opened this issue Aug 17, 2024 · 2 comments
Open

'mkdirat()' ignores the parameter 'mode' #527

Daksh-10 opened this issue Aug 17, 2024 · 2 comments

Comments

@Daksh-10
Copy link

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
Copy link
Contributor

yamt commented Aug 19, 2024

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
Copy link
Author

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants