Bug #1666
closedlibwrap is 32bit only
100%
Description
Illumos does not provide a 64bit libwrap and it looks like the reason is because it currently uses sys_errlist and sys_nerr which are only available in 32bit libc. I've attached the patch I use in StormOS which changes libwrap to use strerror and adds a 64bit version in the hope that it will be helpful.
Files
Related issues
Updated by Alexander Pyhalov almost 10 years ago
- File libwrap64-git.patch libwrap64-git.patch added
The following patch enables 64-bit libwrap (also includes manifests changes). Tested it on recent illumos (4f9a6360ccbecd9ff675131a0d72925cdde1b18b) with php-tcpwrappers 64-bit module.
Updated by Andrew Stormont almost 10 years ago
I don't think this is going to work as you expect because strerror does not alter errno. Your code will always return "Unknown [UNIX ]error". It's worth noting that strerror will return "Unknown error" if the errno is not recognised. I felt this was acceptable and that's why the original patch is like it is. I'm happy to see that someone cares enough about this to contribute though.
Thanks,
Andy.
Updated by Alexander Pyhalov almost 10 years ago
I'm not sure, but man strerror says:
Upon successful completion, strerror() returns a pointer to
the generated message string. Otherwise, it sets errno and
returns a pointer to an error message string. It returns the
string "Unknown error" if errnum is not a valid error
number.
Updated by Robert Mustacchi almost 10 years ago
- Category set to lib - userland libraries
- Status changed from New to Resolved
- Assignee set to Alek Pinchuk
- % Done changed from 0 to 100
- Tags deleted (
needs-triage)
Resolved in 9584cebb1c69707f4c67306b661c2ed47d8676f1.
Updated by Alek Pinchuk almost 10 years ago
- Assignee deleted (
Alek Pinchuk)
I wasn't the author of this change and I'm unable to set assignee to Alexander Pyhalov :(