postgresql/src/interfaces
Tom Lane 0699d053ba Fix portability bugs in use of credentials control messages for peer auth.
Even though our existing code for handling credentials control messages has
been basically unchanged since 2001, it was fundamentally wrong: it did not
ensure proper alignment of the supplied buffer, and it was calculating
buffer sizes and message sizes incorrectly.  This led to failures on
platforms where alignment padding is relevant, for instance FreeBSD on
64-bit platforms, as seen in a recent Debian bug report passed on by
Martin Pitt (http://bugs.debian.org//cgi-bin/bugreport.cgi?bug=612888).

Rewrite to do the message-whacking using the macros specified in RFC 2292,
following a suggestion from Theo de Raadt in that thread.  Tested by me
on Debian/kFreeBSD-amd64; since OpenBSD and NetBSD document the identical
CMSG API, it should work there too.

Back-patch to all supported branches.
2011-05-30 19:16:17 -04:00
..
ecpg Add CheckTableNotInUse calls in DROP TABLE and DROP INDEX. 2011-02-15 15:50:06 -05:00
libpq Fix portability bugs in use of credentials control messages for peer auth. 2011-05-30 19:16:17 -04:00
Makefile Catch all errors in for and while loops in makefiles. Don't ignore any 2008-03-18 16:24:50 +00:00