You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
User and Group implement From<libc::passwd> and From<libc::group>, but these structs contain public fields which are pointers and are not guaranteed to uphold the invariants guaranteed after fetching with functions like getpw* and getgr*. These functions should be unsafe with the requirement that the passed struct is the output from one of these functions. For example:
implUser{/// # Safety////// `passwd` must be the output from some `getpw*` call, like `getpwuid`.unsafefnfrom_passwd(passwd:&libc::passwd) -> Self{
...}}
The text was updated successfully, but these errors were encountered:
User
andGroup
implementFrom<libc::passwd>
andFrom<libc::group>
, but these structs contain public fields which are pointers and are not guaranteed to uphold the invariants guaranteed after fetching with functions likegetpw*
andgetgr*
. These functions should be unsafe with the requirement that the passed struct is the output from one of these functions. For example:The text was updated successfully, but these errors were encountered: