This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] handle EPROTOTYPE for socket invocations with SOCK_* flags

> I'm not sure to agree with this interpretation though, since IMHO the 
> validation of the socket type should depend on the previous validation 
> of the protocol.

I am not certain what interpretation is correct.

> Please bear with me, but I still don't understand what would be the 
> issue with Hurd's errno codes, in this case; are you implying Hurd 
> should behave e.g. like Linux and return EINVAL for "high" invalid 
> values of socket types?

All I meant was that it would be wise for the Hurd's selection of error
codes in these cases to be exactly consistent with some other system,
either Linux or BSD.  However, if it turns out that other systems are not
strictly conforming to POSIX, then the Hurd should do something that does
conform to POSIX regardless of whether those systems change.

> Updated version of the patch: I introduced a new __-prefixed function 
> versioned as GLIBC_PRIVATE to be used also outside libc (libresolv and 
> nscd), I hope to have done it correctly.

Sorry I was not clear.  This should be a static function (expected to be
inlined, but no need to use the inline keyword) in some shared header file
(perhaps a new one).  We don't want a new export for this trivium, not even


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]