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

Make uname always safe #1672

Merged
merged 1 commit into from
Mar 24, 2022
Merged

Make uname always safe #1672

merged 1 commit into from
Mar 24, 2022

Commits on Mar 23, 2022

  1. Make uname always safe

    This fixes several issues with the current `uname` bindings:
    
      - Do not ignore `uname` errors; at least on glibc `uname` can fail,
        so now it returns a `Result` instead of assuming that the call
        will always succeed.
    
      - Do not assume `uname` will initialize every member of `utsname`;
        not every implementation initializes every field, so internally
        the struct is now zero-initialized.
    
      - Do not blindly assume strings returned by `uname` will always be valid UTF-8;
        `UtsName`'s accessors will now return `&OsStr`s instead of `&str`s.
    koute committed Mar 23, 2022
    Configuration menu
    Copy the full SHA
    4ae4cfd View commit details
    Browse the repository at this point in the history