Re: Unix platforms shouldn't mask errors specific to Unix domain sockets
Wan-Teh Chang <[email protected]> Fri, 16 Aug 2013 14:44:20 -0700
| Newsgroups | gmane.comp.mozilla.devel.nspr |
|---|---|
| Message-ID | <CALTJjxEY7CrfQU1dg9EfywPmEwZEuJ3=gSxtTjv43bGaJ579rA@mail.gmail.com> |
On Thu, Aug 15, 2013 at 5:12 PM, Jim Blandy <[email protected]> wrote: > > What would folks say to a patch like the attached? Hi Jim, You didn't attach a patch to your message, but I guess you want to remove this case from from the _MD_unix_map_connect_error() function in unix_errors.c, right? 531 case EACCES: 532 prError = PR_ADDRESS_NOT_SUPPORTED_ERROR; 533 break; In the latest version of the Single Unix Specification, the connect() man page says EACCES can only be reported in this case: The connect() function may fail if: [EACCES]Search permission is denied for a component of the path prefix; or write access to the named socket is denied. So it is more correct to map EACCES to PR_NO_ACCESS_RIGHTS_ERROR. Agreed? Wan-Teh