Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-09-02Move code shared between libpq and backend from backend/libpq/ to common/.Heikki Linnakangas
When building libpq, ip.c and md5.c were symlinked or copied from src/backend/libpq into src/interfaces/libpq, but now that we have a directory specifically for routines that are shared between the server and client binaries, src/common/, move them there. Some routines in ip.c were only used in the backend. Keep those in src/backend/libpq, but rename to ifaddr.c to avoid confusion with the file that's now in common. Fix the comment in src/common/Makefile to reflect how libpq actually links those files. There are two more files that libpq symlinks directly from src/backend: encnames.c and wchar.c. I don't feel compelled to move those right now, though. Patch by Michael Paquier, with some changes by me. Discussion: <69938195-9c76-8523-0af8-eb718ea5b36e@iki.fi>
2016-01-02Update copyright for 2016Bruce Momjian
Backpatch certain files through 9.1
2015-02-17Remove code to match IPv4 pg_hba.conf entries to IPv4-in-IPv6 addresses.Tom Lane
In investigating yesterday's crash report from Hugo Osvaldo Barrera, I only looked back as far as commit f3aec2c7f51904e7 where the breakage occurred (which is why I thought the IPv4-in-IPv6 business was undocumented). But actually the logic dates back to commit 3c9bb8886df7d56a and was simply broken by erroneous refactoring in the later commit. A bit of archives excavation shows that we added the whole business in response to a report that some 2003-era Linux kernels would report IPv4 connections as having IPv4-in-IPv6 addresses. The fact that we've had no complaints since 9.0 seems to be sufficient confirmation that no modern kernels do that, so let's just rip it all out rather than trying to fix it. Do this in the back branches too, thus essentially deciding that our effective behavior since 9.0 is correct. If there are any platforms on which the kernel reports IPv4-in-IPv6 addresses as such, yesterday's fix would have made for a subtle and potentially security-sensitive change in the effective meaning of IPv4 pg_hba.conf entries, which does not seem like a good thing to do in minor releases. So let's let the post-9.0 behavior stand, and change the documentation to match it. In passing, I failed to resist the temptation to wordsmith the description of pg_hba.conf IPv4 and IPv6 address entries a bit. A lot of this text hasn't been touched since we were IPv4-only.
2015-01-06Update copyright for 2015Bruce Momjian
Backpatch certain files through 9.0
2014-04-16check socket creation errors against PGINVALID_SOCKETBruce Momjian
Previously, in some places, socket creation errors were checked for negative values, which is not true for Windows because sockets are unsigned. This masked socket creation errors on Windows. Backpatch through 9.0. 8.4 doesn't have the infrastructure to fix this.
2014-01-07Update copyright for 2014Bruce Momjian
Update all files in head, and files COPYRIGHT and legal.sgml in all back branches.
2013-01-01Update copyrights for 2013Bruce Momjian
Fully update git head, and update back branches in ./COPYRIGHT and legal.sgml files.
2012-10-05getnameinfo_unix has to be taught not to insist on NI_NUMERIC flags, too.Tom Lane
Per testing of previous patch.
2012-01-01Update copyright notices for year 2012.Bruce Momjian
2011-09-11Remove many -Wcast-qual warningsPeter Eisentraut
This addresses only those cases that are easy to fix by adding or moving a const qualifier or removing an unnecessary cast. There are many more complicated cases remaining.
2011-04-13On HP/UX, the structs used by ioctl(SIOCGLIFCONF) are named differentlyHeikki Linnakangas
than on other platforms, and only IPv6 addresses are returned. Because of those two issues, fall back to ioctl(SIOCGIFCONF) on HP/UX, so that it at least compiles and finds IPv4 addresses. This function is currently only used for interpreting samehost/samenet in pg_hba.conf, which isn't that critical.
2011-01-01Stamp copyrights for year 2011.Bruce Momjian
2010-09-20Remove cvs keywords from all files.Magnus Hagander
2010-02-26pgindent run for 9.0Bruce Momjian
2010-01-10Create typedef pgsocket for storing socket descriptors.Magnus Hagander
This silences some warnings on Win64. Not using the proper SOCKET datatype was actually wrong on Win32 as well, but didn't cause any warnings there. Also create define PGINVALID_SOCKET to indicate an invalid/non-existing socket, instead of using a hardcoded -1 value.
2010-01-02Update copyright for the year 2010.Bruce Momjian
2009-10-01Support "samehost" and "samenet" specifications in pg_hba.conf,Tom Lane
by enumerating the machine's IP interfaces to look for a match. Stef Walter
2009-06-11Remove our inadequate kluge that tried to get AIX's various broken versionsTom Lane
of getaddrinfo() to work. Instead, recommend updating the OS to get a working version of getaddrinfo. Per recent discussions.
2009-06-118.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef listBruce Momjian
provided by Andrew.
2009-04-23Suppress some 'variable may be used uninitialized' warnings from gcc 4.4.Tom Lane
2009-01-23Tweak the existing special case for AIX in pg_getaddrinfo_all() to handleTom Lane
yet another failure case in AIX's getaddrinfo(). Per report and patch by Andrew Chernow.
2009-01-01Update copyright for 2009.Bruce Momjian
2008-01-01Update copyrights in source tree to 2008.Bruce Momjian
2007-11-15pgindent run for 8.3.Bruce Momjian
2007-02-10StrNCpy -> strlcpy (not complete)Peter Eisentraut
2007-01-05Update CVS HEAD for 2007 copyright. Back branches are typically notBruce Momjian
back-stamped for this.
2006-10-19Try to fix the AIX getaddrinfo mess in a way that works on all versions.Tom Lane
Going to wait for buildfarm results before backpatching, this time.
2006-10-19Work around reported problem that AIX's getaddrinfo() doesn't seem to zeroTom Lane
sin_port in the returned IP address struct when servname is NULL. This has been observed to cause failure to bind the stats collection socket, and could perhaps cause other issues too. Per reports from Brad Nicholson and Chris Browne.
2006-06-20Split definitions for md5.c out of crypt.h and into their own headerTom Lane
libpq/md5.h, so that there's a clear separation between backend-only definitions and shared frontend/backend definitions. (Turns out this is reversing a bad decision from some years ago...) Fix up references to crypt.h as needed. I looked into moving the code into src/port, but the headers in src/include/libpq are sufficiently intertwined that it seems more work than it's worth to do that.
2006-06-07Prepare code to be built by MSVC:Bruce Momjian
o remove many WIN32_CLIENT_ONLY defines o add WIN32_ONLY_COMPILER define o add 3rd argument to open() for portability o add include/port/win32_msvc directory for system includes Magnus Hagander
2006-03-05Update copyright for 2006. Update scripts.Bruce Momjian
2005-11-22Re-run pgindent, fixing a problem where comment lines after a blankBruce Momjian
comment line where output as too long, and update typedefs for /lib directory. Also fix case where identifiers were used as variable names in the backend, but as typedefs in ecpg (favor the backend for indenting). Backpatch to 8.1.X.
2005-10-17Clean up libpq's pollution of application namespace by renaming theTom Lane
exported routines of ip.c, md5.c, and fe-auth.c to begin with 'pg_'. Also get rid of the vestigial fe_setauthsvc/fe_getauthsvc routines altogether.
2004-12-31Tag appropriate files for rc3PostgreSQL Daemon
Also performed an initial run through of upgrading our Copyright date to extend to 2005 ... first run here was very simple ... change everything where: grep 1996-2004 && the word 'Copyright' ... scanned through the generated list with 'less' first, and after, to make sure that I only picked up the right entries ...
2004-11-08Fix unportable code in SockAddr_cidr_mask: you can't assume thatTom Lane
shifting left by full word width gives zero. Per bug report from Tyson Thomson.
2004-09-27Add new macro as shorthand for MS VC and Borland C++:Bruce Momjian
+ #if defined(_MSC_VER) || defined(__BORLANDC__) + #define WIN32_CLIENT_ONLY + #endif
2004-08-29Pgindent run for 8.0.Bruce Momjian
2004-08-29Update copyright to 2004.Bruce Momjian
2004-05-26*) inet_(client|server)_(addr|port)() and necessary documentation forBruce Momjian
the four functions. > Also, please justify the temp-related changes. I was not aware that we > had any breakage there. patch-tmp-schema.txt contains the following bits: *) Changes pg_namespace_aclmask() so that the superuser is always able to create objects in the temp namespace. *) Changes pg_namespace_aclmask() so that if this is a temp namespace, objects are only allowed to be created in the temp namespace if the user has TEMP privs on the database. This encompasses all object creation, not just TEMP tables. *) InitTempTableNamespace() checks to see if the current user, not the session user, has access to create a temp namespace. The first two changes are necessary to support the third change. Now it's possible to revoke all temp table privs from non-super users and limiting all creation of temp tables/schemas via a function that's executed with elevated privs (security definer). Before this change, it was not possible to have a setuid function to create a temp table/schema if the session user had no TEMP privs. patch-area-path.txt contains: *) Can now determine the area of a closed path. patch-dfmgr.txt contains: *) Small tweak to add the library path that's being expanded. I was using $lib/foo.so and couldn't easily figure out what the error message, "invalid macro name in dynamic library path" meant without looking through the source code. With the path in there, at least I know where to start looking in my config file. Sean Chittenden
2004-04-24Ensure getaddrinfo_all returns null result on failure.Tom Lane
2003-11-29$Header: -> $PostgreSQL Changes ...PostgreSQL Daemon
2003-09-12Revert to our pre-7.4 behavior of identifying Unix-socket connections inTom Lane
ps status as '[local]', not as 'localhost' as the code has been doing recently. That's too easily confused with TCP loopback connections, and there is no good reason to change the behavior anyway.
2003-09-08Avoid using s_addr as a local variable name, to work around brokenTom Lane
system headers on Unixware.
2003-09-05Second try at IPv4-to-v6 mapping code; avoid assuming that the structTom Lane
returned by getaddrinfo_all will have enough room for an IPv6 address.
2003-09-05Allow IPv4-format entries in pg_hba.conf to match IPv6 connectionsTom Lane
that have IPv4-embedded-in-IPv6 addresses. Per idea of Andreas Pflug.
2003-08-04Update copyrights to 2003.Bruce Momjian
2003-08-04pgindent run.Bruce Momjian
2003-08-01Fix inconsistent static-vs-not-static declarations.Tom Lane
2003-07-23Have a go at fixing various outstanding portability issues in code thatTom Lane
was modified for IPv6. Use a robust definition of struct sockaddr_storage, do a proper configure test to see if ss_len exists, don't assume that getnameinfo() will handle AF_UNIX sockets, don't trust getaddrinfo to return the protocol we ask for, etc. This incorporates several outstanding patches from Kurt Roeckx, but I'm to blame for anything that doesn't work ...
2003-06-12Attached is the complete diff against current CVS.Bruce Momjian
Compiles on BCC 5.5 and VC++ 6.0 (with warnings). Karl Waclawek