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

LibC::Passwd is missing fields on FreeBSD #12314

Closed
dmgk opened this issue Jul 24, 2022 · 0 comments · Fixed by #12315
Closed

LibC::Passwd is missing fields on FreeBSD #12314

dmgk opened this issue Jul 24, 2022 · 0 comments · Fixed by #12315
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. platform:freebsd topic:stdlib:system

Comments

@dmgk
Copy link
Contributor

dmgk commented Jul 24, 2022

As currently defined, LibC::Passwd

struct Passwd
pw_name : Char*
pw_passwd : Char*
pw_uid : UidT
pw_gid : GidT
pw_gecos : Char*
pw_dir : Char*
pw_shell : Char*
end
is currently missing a few fields, which leads to getpwnam_r and getpwuid_r returning wrong data and causes spec/std/path_spec.cr to fail on FreeBSD:

Path .home doesn't return empty string if environment variable is empty
     Failure/Error: Path.home.should_not eq(Path.new(""))

       Expected: actual_value != Path[""]
            got: Path[""]

     # spec/std/path_spec.cr:947
@dmgk dmgk added the kind:bug A bug in the code. Does not apply to documentation, specs, etc. label Jul 24, 2022
@straight-shoota straight-shoota linked a pull request Jul 25, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. platform:freebsd topic:stdlib:system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants