- avoid possible negative integer use in fd_isset and auth/sock
- fix invalid array comparisons
- correct handling of potentially negative arguments (sockets etc.)
- correct handling of potentially negative returns (sockets etc.)
- correct handling of return values (fstat, rename, chmod, getsockname, etc.)
- logging of OS/system underlying errors