Messages in this thread | | | Date | Thu, 6 Jul 2000 00:32:32 +0200 | From | Jakob Østergaard <> | Subject | Re: SO_PASSCRED broken in 2.4 ? - the end |
| |
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/
| |