Re: SO_PASSCRED broken in 2.4 ? - the end

From: Jakob Østergaard (jakob@ostenfeld.dtu.dk)
Date: Wed Jul 05 2000 - 17:32:32 EST


On Tue, 04 Jul 2000, kuznet@ms2.inr.ac.ru wrote:

> Hello!
>
> > memset(&ancbuf, 0, CMSG_SPACE(cmsg_bufsize));
>
> Argh, yes, I see. You do zero-length read.
>
> Well, bug will be fixed, but it does not mean yet, that
> you make something valid. Such read is not well-defined.

For the record:

After some off-list help help from Alexy, I now use getsockopt() with
SO_PEERCRED to read the credentials. This is a much easier solution to the
problem, that I was previously unaware of existed.

Big thanks go to Alexy for his patience in this, and apologies to the rest of
you for clobbering the list with non-kernel programming problems. It did
turn out to be kernel-related though, but not a definite bug in the kernel.

Returning semi-random errors from undefined calls is an oddity, not a bug :)

Oddities are good, without them there would be no adventure and no mysteries
left. :)

Cheers,

-- 
................................................................
: jakob@ostenfeld.dtu.dk  : And I see the elder races,         :
:.........................: putrid forms of man                :
:   Jakob Østergaard      : See him rise and claim the earth,  :
:        OZ9ABN           : his downfall is at hand.           :
:.........................:............{Konkhra}...............:

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jul 07 2000 - 21:00:17 EST