postgres/src
Tom Lane 13c00ae8c7 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:05 -04:00
..
backend Fix portability bugs in use of credentials control messages for peer auth. 2011-05-30 19:16:05 -04:00
bin Suppress foreign data wrappers and foreign servers in partial dumps 2011-05-30 23:34:34 +03:00
include Fix VACUUM so that it always updates pg_class.reltuples/relpages. 2011-05-30 17:06:52 -04:00
interfaces Fix portability bugs in use of credentials control messages for peer auth. 2011-05-30 19:16:05 -04:00
makefiles Rewrite installation makefile rules without for loops 2011-05-02 01:05:08 +03:00
pl Remove usage of &PL_sv_undef in hashes and arrays 2011-05-30 12:42:48 -04:00
port Assorted minor changes to silence Windows compiler warnings. 2011-04-25 12:56:53 -04:00
template Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
test The row-version chaining in Serializable Snapshot Isolation was still wrong. 2011-05-30 20:47:17 +03:00
timezone Split PGC_S_DEFAULT into two values, for true boot_val vs computed default. 2011-05-11 19:57:38 -04:00
tools Convert builddoc.bat into a perl script that actually works. 2011-05-25 00:21:07 -04:00
tutorial Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Fix some oversights in distprep and maintainer-clean targets. 2011-03-10 00:04:05 -05:00
Makefile.global.in Rename pg_regress option --multibyte to --encoding 2011-04-15 08:42:05 +03:00
Makefile.shlib Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
nls-global.mk Fix makefile logic to not break the build when xgettext is missing 2010-10-14 23:16:46 +03:00
win32.mak Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00