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

FFI implementation libc getuid on Linux #3753

Closed
pcwizz opened this issue Jul 18, 2024 · 2 comments · Fixed by #3794
Closed

FFI implementation libc getuid on Linux #3753

pcwizz opened this issue Jul 18, 2024 · 2 comments · Fixed by #3794

Comments

@pcwizz
Copy link

pcwizz commented Jul 18, 2024

I relatively often find code I want to run with Miri that depends on libc getuid when targeting linux. At least to my mind it is a basic operating system API worthy of a miri implementation that would enable more miri code coverage.

@RalfJung
Copy link
Member

We in fact already support getuid, but only when called from inside std... should be easy to change that to allow all code to call it.

The only hard part is a policy decision: currently it always returns 1000. Should we make it return the real ID instead? But what would that even mean when we run on a Windows host?

@pcwizz
Copy link
Author

pcwizz commented Jul 18, 2024 via email

@bors bors closed this as completed in 308fa90 Aug 7, 2024
RalfJung pushed a commit to RalfJung/rust that referenced this issue Aug 10, 2024
RalfJung pushed a commit to RalfJung/rust that referenced this issue Aug 18, 2024
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

Successfully merging a pull request may close this issue.

2 participants