We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
set_thread_res_uid
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
Uid in rustix has a strange history of not liking the value -1. While it is nowadays sound (no unsafe) to create one, it is still incorrect.
Uid
-1
unsafe
At the same time the set_thread_res_uid takes three Uids that have a clear use of being -1 in this syscall interface.
It is possible to implement set_thread_euid like
set_thread_euid
set_thread_res_uid( Uid::from_raw_unchecked(-1_i32 as u32), euid, Uid::from_raw_unchecked(-1_i32 as u32), )?;
this is
So my suggestion is to change set_thread_res_uid to take three Option<Uid> in a semver compatible way.
Option<Uid>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Uid
in rustix has a strange history of not liking the value-1
. While it is nowadays sound (nounsafe
) to create one, it is still incorrect.At the same time the
set_thread_res_uid
takes threeUid
s that have a clear use of being-1
in this syscall interface.It is possible to implement
set_thread_euid
likethis is
So my suggestion is to change
set_thread_res_uid
to take threeOption<Uid>
in a semver compatible way.The text was updated successfully, but these errors were encountered: