Commit Graph

180 Commits

Author SHA1 Message Date
Magnus Hagander 29ac718f47 Use PQExpBuffer for error message in fe-auth.c.
In passing, change functions that passedin both PGconn and
parts of it to just pass in the PGconn.
2007-07-23 17:52:06 +00:00
Magnus Hagander b9ab88243e Stupid typo. 2007-07-23 10:57:36 +00:00
Magnus Hagander f70866fb23 SSPI authentication on Windows. GSSAPI compatible client when doing Kerberos
against a Unix server, and Windows-specific server-side authentication
using SSPI "negotiate" method (Kerberos or NTLM).

Only builds properly with MSVC for now.
2007-07-23 10:16:54 +00:00
Magnus Hagander 784fd04940 Enable GSSAPI to build using MSVC. Always build GSSAPI when Kerberos is
enabled, because the only Kerberos library supported always contains it.
2007-07-12 14:43:21 +00:00
Magnus Hagander 65a513c249 Support GSSAPI builds where the header is <gssapi.h> and not <gssapi/gssapi.h>,
such as OpenBSD (possibly all Heimdal).

Stefan Kaltenbrunner
2007-07-12 14:36:52 +00:00
Magnus Hagander 6771994058 Fix freenig of names in Kerberos when using MIT - need to use the
free function provided in the Kerberos library.
This fixes a very hard to track down heap corruption on windows
when using debug runtimes.
2007-07-12 14:10:39 +00:00
Magnus Hagander 6160106c74 Add support for GSSAPI authentication.
Documentation still being written, will be committed later.

Henry B. Hotz and Magnus Hagander
2007-07-10 13:14:22 +00:00
Peter Eisentraut 4ab8fcba8a StrNCpy -> strlcpy (not complete) 2007-02-10 14:58:55 +00:00
Bruce Momjian 29dccf5fe0 Update CVS HEAD for 2007 copyright. Back branches are typically not
back-stamped for this.
2007-01-05 22:20:05 +00:00
Bruce Momjian f99a569a2e pgindent run for 8.2. 2006-10-04 00:30:14 +00:00
Tom Lane beca984e5f Fix bugs in plpgsql and ecpg caused by assuming that isspace() would only
return true for exactly the characters treated as whitespace by their flex
scanners.  Per report from Victor Snezhko and subsequent investigation.

Also fix a passel of unsafe usages of <ctype.h> functions, that is, ye olde
char-vs-unsigned-char issue.  I won't miss <ctype.h> when we are finally
able to stop using it.
2006-09-22 21:39:58 +00:00
Bruce Momjian e0522505bd Remove 576 references of include files that were not needed. 2006-07-14 14:52:27 +00:00
Bruce Momjian 51e8882197 Revert part of recent include patch not ready for application. 2006-07-14 04:59:30 +00:00
Bruce Momjian 03c2e5924e Add additional includes needed on some platforms. 2006-07-14 04:44:46 +00:00
Joe Conway 9e196d7c92 Clean up for warning:
fe-auth.c:573: warning: passing argument 1 of 'free' discards qualifiers
  from pointer target type
pg_krb5_authname used to return a (const char *) to memory allocated by
krb. Somewhere along the lines this was changed so that a copy was
made, returned, and freed instead. However the const modifier was never
removed.
2006-07-12 02:31:56 +00:00
Tom Lane 47a37aeebd Split definitions for md5.c out of crypt.h and into their own header
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-20 19:56:52 +00:00
Bruce Momjian 526f773d2f * Stephen Frost (sfrost@snowman.net) wrote:
>   I've now tested this patch at home w/ 8.2HEAD and it seems to fix the
>   bug.  I plan on testing it under 8.1.2 at work tommorow with
>   mod_auth_krb5, etc, and expect it'll work there.  Assuming all goes
>   well and unless someone objects I'll forward the patch to -patches.
>   It'd be great to have this fixed as it'll allow us to use Kerberos to
>   authenticate to phppgadmin and other web-based tools which use
>   Postgres.

  While playing with this patch under 8.1.2 at home I discovered a
  mistake in how I manually applied one of the hunks to fe-auth.c.
  Basically, the base code had changed and so the patch needed to be
  modified slightly.  This is because the code no longer either has a
  freeable pointer under 'name' or has 'name' as NULL.

  The attached patch correctly frees the string from pg_krb5_authname
  (where it had been strdup'd) if and only if pg_krb5_authname returned
  a string (as opposed to falling through and having name be set using
  name = pw->name;).  Also added a comment to this effect.

Backpatch to 8.1.X.

Stephen Frost
2006-03-06 17:59:30 +00:00
Bruce Momjian f2f5b05655 Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
Bruce Momjian 6e51bcef8e Back out patch pending review.
---------------------------------------------------------------------------

>   I've now tested this patch at home w/ 8.2HEAD and it seems to fix the
>   bug.  I plan on testing it under 8.1.2 at work tommorow with
>   mod_auth_krb5, etc, and expect it'll work there.  Assuming all goes
>   well and unless someone objects I'll forward the patch to -patches.
>   It'd be great to have this fixed as it'll allow us to use Kerberos to
>   authenticate to phppgadmin and other web-based tools which use
>   Postgres.

  While playing with this patch under 8.1.2 at home I discovered a
  mistake in how I manually applied one of the hunks to fe-auth.c.
  Basically, the base code had changed and so the patch needed to be
  modified slightly.  This is because the code no longer either has a
  freeable pointer under 'name' or has 'name' as NULL.

  The attached patch correctly frees the string from pg_krb5_authname
  (where it had been strdup'd) if and only if pg_krb5_authname returned
  a string (as opposed to falling through and having name be set using
  name = pw->name;).  Also added a comment to this effect.
  Please review.

Stephen Frost (sfrost@snowman.net) wrote:
2006-02-12 20:08:29 +00:00
Bruce Momjian 3e682635e3 > I've now tested this patch at home w/ 8.2HEAD and it seems to fix the
>   bug.  I plan on testing it under 8.1.2 at work tommorow with
>   mod_auth_krb5, etc, and expect it'll work there.  Assuming all goes
>   well and unless someone objects I'll forward the patch to -patches.
>   It'd be great to have this fixed as it'll allow us to use Kerberos to
>   authenticate to phppgadmin and other web-based tools which use
>   Postgres.

  While playing with this patch under 8.1.2 at home I discovered a
  mistake in how I manually applied one of the hunks to fe-auth.c.
  Basically, the base code had changed and so the patch needed to be
  modified slightly.  This is because the code no longer either has a
  freeable pointer under 'name' or has 'name' as NULL.

  The attached patch correctly frees the string from pg_krb5_authname
  (where it had been strdup'd) if and only if pg_krb5_authname returned
  a string (as opposed to falling through and having name be set using
  name = pw->name;).  Also added a comment to this effect.
  Please review.

Stephen Frost (sfrost@snowman.net) wrote:
2006-02-12 20:04:42 +00:00
Peter Eisentraut 6840cccd11 Rename pg_make_encrypted_password to PQencryptPassword. 2005-12-26 14:58:06 +00:00
Tom Lane ea9b028dc7 Add an officially exported libpq function to encrypt passwords, and
modify the previous \password patch to use it instead of depending
on a not-officially-exported function.  Per discussion.
2005-12-23 01:16:38 +00:00
Bruce Momjian 436a2956d8 Re-run pgindent, fixing a problem where comment lines after a blank
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-11-22 18:17:34 +00:00
Bruce Momjian 819159709f I have applied the following patch to document PQinitSSL() and
PQregisterThreadLock().

I also remove the crypt() mention in the libpq threading section and
added a single sentence in the client-auth manual page under crypt().
Crypt authentication is so old now that a separate paragraph about it
seemed unwise.

I also added a comment about our use of locking around pqGetpwuid().
2005-10-24 15:38:37 +00:00
Tom Lane d330f1554d Clean up libpq's pollution of application namespace by renaming the
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.
2005-10-17 16:24:20 +00:00
Bruce Momjian 1dc3498251 Standard pgindent run for 8.1. 2005-10-15 02:49:52 +00:00
Tom Lane 18d0ca2d1b Fix Kerberos authentication in wake of virtual-hosts changes --- need
to call krb5_sname_to_principal() always.  Also, use krb_srvname rather
than the hardwired string 'postgres' as the appl_version string in the
krb5_sendauth/recvauth calls, to avoid breaking compatibility with PG
8.0.  Magnus Hagander
2005-10-08 19:32:58 +00:00
Neil Conway 4714984149 Fix a theoretical memory leak in pg_password_sendauth(). If the first
malloc() succeeded but the second failed, the buffer allocated by the
first malloc() would be leaked. Fix this by allocating both buffers
via a single malloc(), as suggested by Tom.

Per Coverity static analysis performed by EnterpriseDB.
2005-06-30 01:59:20 +00:00
Neil Conway a159ad3048 Remove support for Kerberos V4. It seems no one is using this, it has
some security issues, and upstream has declared it "dead". Patch from
Magnus Hagander, minor editorialization from Neil Conway.
2005-06-27 02:04:26 +00:00
Bruce Momjian 72c53ac3a7 Allow kerberos name and username case sensitivity to be specified from
postgresql.conf.

---------------------------------------------------------------------------


Here's an updated version of the patch, with the following changes:

1) No longer uses "service name" as "application version". It's instead
hardcoded as "postgres". It could be argued that this part should be
backpatched to 8.0, but it doesn't make a big difference until you can
start changing it with GUC / connection parameters. This change only
affects kerberos 5, not 4.

2) Now downcases kerberos usernames when the client is running on win32.

3) Adds guc option for "krb_caseins_users" to make the server ignore
case mismatch which is required by some KDCs such as Active Directory.
Off by default, per discussion with Tom. This change only affects
kerberos 5, not 4.

4) Updated so it doesn't conflict with the rendevouz/bonjour patch
already in ;-)

Magnus Hagander
2005-06-04 20:42:43 +00:00
Tom Lane e6befdc9d1 Kerberos fixes from Magnus Hagander --- in theory Kerberos 5 auth
should work on Windows now.  Also, rename set_noblock to pg_set_noblock;
since it is included in libpq, the former name polluted application
namespace.
2005-03-25 00:34:31 +00:00
Tom Lane 40f32f351a Add conditional inclusion of <com_err.h> to support old 'heimdal'
version of Kerberos.  Per report from Reinhard Max.
2005-01-12 21:37:54 +00:00
Tom Lane edf3832b5c Clean up code in libpq that obtains user's home directory: make a single
subroutine that can hide platform dependencies.  The WIN32 path is still
a stub, but I await a fix from one of the win32 hackers.
Also clean up unnecessary #ifdef WIN32 ugliness in a couple of places.
2005-01-04 23:18:25 +00:00
PostgreSQL Daemon 2ff501590b Tag appropriate files for rc3
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-12-31 22:04:05 +00:00
Tom Lane da59a70c09 Remove direct inclusions of <com_err.h> as well as configure test for
its presence.  This amounts to desupporting Kerberos 5 releases 1.0.*,
which is small loss, and simplifies use of our Kerberos code on platforms
with Red-Hat-style include file layouts.  Per gripe from John Gray and
followup discussion.
2004-12-20 17:13:41 +00:00
Peter Eisentraut e9c05281b5 Get rid of perror(), substitute some better phrased error messages.
malloc() doesn't set errno, so most uses were buggy anyway.
2004-11-09 15:57:57 +00:00
Bruce Momjian 88fd162ef6 Allow pg_ctl to determine the server is up when getting a request for a
password.

Make password error message a #define and use it consistently.

Sean Chittenden
2004-10-16 03:10:17 +00:00
Bruce Momjian 1ad6878276 Revert patch that removed BUFSIZ usage. The memory has to hold the
structures plus pointers used by the structure.
2004-09-28 00:07:01 +00:00
Bruce Momjian b534a5605f Remove use of large BUFSIZ for buffers and use the proper struct sizes.
This greatly helps threaded libpq programs.
2004-09-27 23:39:14 +00:00
Bruce Momjian da9a8649d8 Update copyright to 2004. 2004-08-29 04:13:13 +00:00
Bruce Momjian 6daf396879 Add thread locking to SSL and Kerberos connections.
I have removed the docs mentioning that SSL and Kerberos are not
thread-safe.

Manfred Spraul
2004-03-24 03:45:00 +00:00
Neil Conway 192ad63bd7 More janitorial work: remove the explicit casting of NULL literals to a
pointer type when it is not necessary to do so.

For future reference, casting NULL to a pointer type is only necessary
when (a) invoking a function AND either (b) the function has no prototype
OR (c) the function is a varargs function.
2004-01-07 18:56:30 +00:00
Tom Lane fb8ac3fcb6 Dept. of third thoughts: in fact, libpq should support SCM_CREDS challenge
even when HAVE_GETPEEREID is defined, else it will be unable to connect to
pre-7.4 backends that are using IDENT authentication.
2003-12-20 18:45:49 +00:00
Tom Lane b8f2980209 Fix broken IDENT support for FreeBSD (appears to have been broken by
ill-considered conditional logic in getpeereid patch of 3-Dec-2002).
Per bug #1021.
2003-12-20 18:24:52 +00:00
PostgreSQL Daemon 969685ad44 $Header: -> $PostgreSQL Changes ... 2003-11-29 19:52:15 +00:00
Peter Eisentraut 9a8b7c0f69 Cast field-length variables used in printf to int, because sometimes
they might be of a wider type.
2003-11-26 15:55:01 +00:00
Bruce Momjian 6db0a6b035 Remove socket credentials defines not referenced. 2003-10-25 03:48:47 +00:00
Bruce Momjian f3c3deb7d0 Update copyrights to 2003. 2003-08-04 02:40:20 +00:00
Bruce Momjian 089003fb46 pgindent run. 2003-08-04 00:43:34 +00:00
Bruce Momjian d9ddbdaa95 > This change (I'm sure this will wrap poorly -- sorry):
> http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/libpq/pqcomm.h.diff?r1=1.85&r2=1.86
>
> modified SockAddr, but no corresponding change was made here
> (fe-auth.c:612):
>
>   case AUTH_REQ_KRB5:
> #ifdef KRB5
>   if (pg_krb5_sendauth(PQerrormsg, conn->sock, &conn->laddr.in,
>                        &conn->raddr.in,
>                        hostname) != STATUS_OK)
>
> It's not obvious to me what the change ought to be though.

This patch should hopefully fix both kerberos 4 and 5.

Kurt Roeckx
2003-06-25 01:19:47 +00:00
Bruce Momjian a16a031411 Make libpq thread-safe with configure --with-threads option.
Lee Kindness
2003-06-14 17:49:54 +00:00
Tom Lane 6bdb7aa4db libpq can now talk to either 3.0 or 2.0 protocol servers. It first tries
protocol 3, then falls back to 2 if postmaster rejects the startup packet
with an old-format error message.  A side benefit of the rewrite is that
SSL-encrypted connections can now be made without blocking.  (I think,
anyway, but do not have a good way to test.)
2003-06-08 17:43:00 +00:00
Tom Lane 32be7207aa Revert kerberos code breakage. 2003-05-16 04:58:03 +00:00
Bruce Momjian 12c9423832 Allow Win32 to compile under MinGW. Major changes are:
Win32 port is now called 'win32' rather than 'win'
        add -lwsock32 on Win32
        make gethostname() be only used when kerberos4 is enabled
        use /port/getopt.c
        new /port/opendir.c routines
        disable GUC unix_socket_group on Win32
        convert some keywords.c symbols to KEYWORD_P to prevent conflict
        create new FCNTL_NONBLOCK macro to turn off socket blocking
        create new /include/port.h file that has /port prototypes, move
          out of c.h
        new /include/port/win32_include dir to hold missing include files
        work around ERROR being defined in Win32 includes
2003-05-15 16:35:30 +00:00
Tom Lane bd8d441775 Second round of FE/BE protocol changes. Frontend->backend messages now
have length counts, and COPY IN data is packetized into messages.
2003-04-19 00:02:30 +00:00
Tom Lane cb7fb3ca95 First phase of FE/BE protocol modifications: new StartupPacket layout
with variable-width fields.  No more truncation of long user names.
Also, libpq can now send its environment-variable-driven SET commands
as part of the startup packet, saving round trips to server.
2003-04-17 22:26:02 +00:00
Tom Lane e4704001ea This patch fixes a bunch of spelling mistakes in comments throughout the
PostgreSQL source code.

Neil Conway
2003-03-10 22:28:22 +00:00
Tom Lane 3cb282f3e6 Guard against array overrun, per report from Yichen Xie. This case
can only occur if the constant DEFAULT_CLIENT_AUTHSVC is given a bogus
value, so it doesn't seem worth back-patching, but I'll fix it in HEAD.
2003-01-29 01:18:21 +00:00
Bruce Momjian 6f0ebe3fba Deal with cases where getpeereid _and_ another creditial method is
supported.
2002-12-03 22:09:20 +00:00
Bruce Momjian e50f52a074 pgindent run. 2002-09-04 20:31:48 +00:00
Bruce Momjian a12b4e279b I checked all the previous string handling errors and most of them were
already fixed by You. However there were a few left and attached patch
should fix the rest of them.

I used StringInfo only in 2 places and both of them are inside debug
ifdefs. Only performance penalty will come from using strlen() like all
the other code does.

I also modified some of the already patched parts by changing
snprintf(buf, 2 * BUFSIZE, ... style lines to
snprintf(buf, sizeof(buf), ... where buf is an array.

Jukka Holappa
2002-09-02 06:11:43 +00:00
Tom Lane 5241a6259f Remove support for version-0 FE/BE protocol, per pghackers discussion.
This breaks support for 6.2 or older client libraries.
2002-08-29 03:22:01 +00:00
Bruce Momjian b6d2faaf24 Hello, i noticed that win32 native stopped working/compiling after the SSL merge
.
So i took the opportunity to fix some stuff:

1. Made the thing compile (typos & needed definitions) with the new pqsecure_* s
tuff, and added fe-secure.c to the win32.mak makefile.
2. Fixed some MULTIBYTE compile errors (when building without MB support).
3. Made it do that you can build with debug info: "nmake -f win32.mak DEBUG=1".
4. Misc small compiler speedup changes.

The resulting .dll has been tested in production, and everything seems ok.
I CC:ed -hackers because i'm not sure about two things:

1. In libpq-int.h I typedef ssize_t as an int because Visual C (v6.0)
doesn't de fine ssize_t. Is that ok, or is there any standard about what
type should be use d for ssize_t?

2. To keep the .dll api consistent regarding MULTIBYTE I just return -1
in fe-connect.c:PQsetClientEncoding() instead of taking away the whole
function. I wonder if i should do any compares with the
conn->client_encoding and return 0 if not hing would have changed (if so
how do i check that?).

Regards

Magnus Naeslund
2002-07-20 05:43:31 +00:00
Bruce Momjian d84fe82230 Update copyright to 2002. 2002-06-20 20:29:54 +00:00
Jan Wieck 469cb65aca Katherine Ward wrote:
> Changes to avoid collisions with WIN32 & MFC names...
> 1.  Renamed:
>       a.  PROC => PGPROC
>       b.  GetUserName() => GetUserNameFromId()
>       c.  GetCurrentTime() => GetCurrentDateTime()
>       d.  IGNORE => IGNORE_DTF in include/utils/datetime.h & utils/adt/datetim
>
> 2.  Added _P to some lex/yacc tokens:
>       CONST, CHAR, DELETE, FLOAT, GROUP, IN, OUT

Jan
2002-06-11 13:40:53 +00:00
Peter Eisentraut 39e77dd365 Remove reference to NAMEDATALEN, which wasn't necessary anyway. 2002-04-24 23:00:40 +00:00
Peter Eisentraut 42c3381fc7 Heimdal support (Kerberos V implementation from KTH) 2002-02-23 04:17:47 +00:00
Bruce Momjian ea08e6cd55 New pgindent run with fixes suggested by Tom. Patch manually reviewed,
initdb/regression tests pass.
2001-11-05 17:46:40 +00:00
Bruce Momjian b81844b173 pgindent run on all C files. Java run to follow. initdb/regression
tests pass.
2001-10-25 05:50:21 +00:00
Bruce Momjian be83aac6d2 Disable local creds on OpenBSD because it doesn't support it. Document
supported platforms in pg_hba.conf.
2001-09-26 19:54:12 +00:00
Tom Lane c1c888a9de Code review for MD5 authorization patch. Clean up some breakage
(salts were always zero!?), add much missing documentation.
2001-09-21 20:31:49 +00:00
Bruce Momjian a7621c92ae Update SCM_CREDS for Net/Free/BSD-OS. Add configure checks. 2001-09-07 19:52:54 +00:00
Bruce Momjian 8dbaca424f Fix SCM_CREDS for FreeBSD, from Teodor Sigaev. 2001-08-21 15:49:17 +00:00
Bruce Momjian 9bee8a1fd9 Add missing include for SCM_CREDS. 2001-08-21 15:21:25 +00:00
Bruce Momjian bca9d0cdf4 Add SCM_CREDS to get owner of unix-domain socket on BSD-like systems. 2001-08-21 00:33:28 +00:00
Bruce Momjian 0a3094b6f3 Reorder MD5/crypt so MD5 comes first in the code. 2001-08-17 15:40:07 +00:00
Bruce Momjian 2637f887e7 Remove some unneeded dashes from libpq comments. 2001-08-17 15:11:15 +00:00
Bruce Momjian 27c272917a Add \n to libpq print output where needed. 2001-08-17 15:02:18 +00:00
Bruce Momjian b5453fae74 Force crypt() salt to be null-terminated. 2001-08-17 03:09:31 +00:00
Bruce Momjian da45a0bdb7 Add 4-byte MD5 salt. 2001-08-17 02:59:20 +00:00
Bruce Momjian d4fb1b2388 Move md5.h contents to crypt.h. 2001-08-15 21:08:21 +00:00
Bruce Momjian 38bb1abcda Use MD5 for wire protocol encryption for >= 7.2 client/server.
Allow pg_shadow to be MD5 encrypted.
Add ENCRYPTED/UNENCRYPTED option to CREATE/ALTER user.
Add password_encryption postgresql.conf option.
Update wire protocol version to 2.1.
2001-08-15 18:42:16 +00:00
Peter Eisentraut 1a17447be1 NLS for libpq. Clean up the message formats and change the documentation
accordingly.
2001-07-15 13:45:04 +00:00
Bruce Momjian 9e1552607a pgindent run. Make it all clean. 2001-03-22 04:01:46 +00:00
Tom Lane d08741eab5 Restructure the key include files per recent pghackers discussion: there
are now separate files "postgres.h" and "postgres_fe.h", which are meant
to be the primary include files for backend .c files and frontend .c files
respectively.  By default, only include files meant for frontend use are
installed into the installation include directory.  There is a new make
target 'make install-all-headers' that adds the whole content of the
src/include tree to the installed fileset, for use by people who want to
develop server-side code without keeping the complete source tree on hand.
Cleaned up a whole lot of crufty and inconsistent header inclusions.
2001-02-10 02:31:31 +00:00
Bruce Momjian 623bf843d2 Change Copyright from PostgreSQL, Inc to PostgreSQL Global Development Group. 2001-01-24 19:43:33 +00:00
Peter Eisentraut 996832caee Make the location of the Kerberos server key file run time configurable
(rather than compile time). For libpq, even when Kerberos support is
compiled in, the default user name should still fall back to geteuid()
if it can't be determined via the Kerberos system.

A couple of fixes for string type configuration parameters, now that there
is one.
2000-08-25 10:00:35 +00:00
Peter Eisentraut 1652d43358 Remove fmgrstamp-h business -- not needed and confusing
Add options to configure to automatically build for Kerberos
support; no more editing of make files.
2000-06-17 00:10:40 +00:00
Bruce Momjian d45f7dfdca Update kerberos patch 2000-05-27 04:13:05 +00:00
Bruce Momjian 632a7ed759 Back out kerberos changes. Causes compile problems. 2000-05-27 03:58:20 +00:00
Bruce Momjian 9500b35f17 Patch for Kerberos V.
Most (nearly all) of the work was done by David Wragg <dpw@doc.ic.ac.uk>

He patched 6.5.3. I've updated it for 7.0RC5.

It works for MIT kerberos 1.1.1 (and previously for 1.0.6 as well).

I've got the patch against 6.5.3, plus kerberized RPMS.

Mike Wyer <mw@doc.ic.ac.uk>     ||         "Woof?"
2000-05-27 03:39:33 +00:00
Bruce Momjian 52f77df613 Ye-old pgindent run. Same 4-space tabs. 2000-04-12 17:17:23 +00:00
Tom Lane a71daab4b4 Change PQconndefaults() to return a malloc'd array, instead of a static
array.  This allows processing of conninfo strings to be made thread-safe,
at the cost of a small memory leak in applications that use
PQconndefaults() and are not updated to free the returned array via
the new PQconninfoFree() function.  But PQconndefaults() is probably not
used very much, so this seems like a good compromise.
2000-03-11 03:08:37 +00:00
Peter Eisentraut 9ceb5d8a7b Fixed psql double quoting of SQL ids
Fixed libpq printing functions
2000-02-07 23:10:11 +00:00
Bruce Momjian 5c25d60244 Add:
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc

to all files copyright Regents of Berkeley.  Man, that's a lot of files.
2000-01-26 05:58:53 +00:00
Bruce Momjian 0cb6bc70ce Hi!
Here is a patch to bring both libpq and psql to a state where it compiles on
win32 (native) again. A lot of things have changed, and I have not been able
to keep up with them all, so it has been broken for quite a while.
After this patch, at least it compiles. It also talks "basic talk" to the
server, but I have not yet tested all things. Sending queries, and using
e.g. \d or \dt works fine. The rest will have to be tested further.
It also bumps the version on libpq.dll to 7.0.

Everything should be enclosed in #ifdef WIN32, unless I have missed
something. Except for one or maybe two places where I have moved a #include
that should not be used on win32 from the "global area" into a "#ifndef
WIN32 area".


//Magnus
2000-01-18 19:05:31 +00:00
Tom Lane 51f62d505e Standardize on MAXPGPATH as the size of a file pathname buffer,
eliminating some wildly inconsistent coding in various parts of the
system.  I set MAXPGPATH = 1024 in config.h.in.  If anyone is really
convinced that there ought to be a configure-time test to set the
value, go right ahead ... but I think it's a waste of time.
1999-10-25 03:08:03 +00:00
Tom Lane ab5cafa5d3 Update frontend libpq to remove limits on query lengths,
error/notice message lengths, and number of fields per tuple.  Add
pqexpbuffer.c/.h, a frontend version of backend's stringinfo module.
This is first step in applying Mike Ansley's long-query patches,
even though he didn't do any of these particular changes...
1999-08-31 01:37:37 +00:00
Bruce Momjian e259780b13 Enable WIN32 compilation of libpq. 1999-07-19 06:25:40 +00:00
Bruce Momjian e44c931801 Re-add getopt.h check, remove NT-specific tests for it. 1999-07-19 02:27:16 +00:00