Fix for libpq compile
This commit caused my compile to fail on CVS HEAD:
revision 1.399
date: 2010/07/18 11:37:26; author: petere; state: Exp; lines: +88 -1
Add server authentication over Unix-domain sockets
This adds a libpq connection parameter requirepeer that specifies the user
name that the server process is expected to run under.
reviewed by KaiGai Kohei
The problem is that the code was not checking for SO_PEERCRED.
I have applied the attached check, but without SO_PEERCRED I can't
report the username which failed. Please adjust this if necessary.
Thanks.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ None of us is going to be here forever. +
Attachments:
/rtmp/difftext/x-diffDownload+4-0
Bruce Momjian <bruce@momjian.us> writes:
I have applied the attached check, but without SO_PEERCRED I can't
report the username which failed. Please adjust this if necessary.
AFAICT that should have been using the uid variable, not any of the
platform-specific things. Apparently this was not tested before commit
on any but SO_PEERCRED platforms.
regards, tom lane