aboutsummaryrefslogtreecommitdiff
path: root/src/backend/libpq/auth.c
Commit message (Collapse)AuthorAge
...
* Message editing: remove gratuitous variations in message wording, standardizePeter Eisentraut2003-09-25
| | | | | terms, add some clarifications, fix some untranslatable attempts at dynamic message building.
* Update copyrights to 2003.Bruce Momjian2003-08-04
|
* pgindent run.Bruce Momjian2003-08-04
|
* Localizability improvement.Tom Lane2003-07-28
|
* Have SSL text print only when SSL mode is enabled.Bruce Momjian2003-07-26
|
* At long last I put together a patch to support 4 client SSL negotiationBruce Momjian2003-07-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modes (and replace the requiressl boolean). The four options were first spelled out by Magnus Hagander <mha@sollentuna.net> on 2000-08-23 in email to pgsql-hackers, archived here: http://archives.postgresql.org/pgsql-hackers/2000-08/msg00639.php My original less-flexible patch and the ensuing thread are archived at: http://dbforums.com/t623845.html Attached is a new patch, including documentation. To sum up, there's a new client parameter "sslmode" and environment variable "PGSSLMODE", with these options: sslmode description ------- ----------- disable Unencrypted non-SSL only allow Negotiate, prefer non-SSL prefer Negotiate, prefer SSL (default) require Require SSL The only change to the server is a new pg_hba.conf line type, "hostnossl", for specifying connections that are not allowed to use SSL (for example, to prevent servers on a local network from accidentally using SSL and wasting cycles). Thus the 3 pg_hba.conf line types are: pg_hba.conf line types ---------------------- host applies to either SSL or regular connections hostssl applies only to SSL connections hostnossl applies only to regular connections These client and server options, the postgresql.conf ssl = false option, and finally the possibility of compiling with no SSL support at all, make quite a range of combinations to test. I threw together a test script to try many of them out. It's in a separate tarball with its config files, a patch to psql so it'll announce SSL connections even in absence of a tty, and the test output. The test is especially informative when run on the same tty the postmaster was started on, so the FATAL: errors during negotiation are interleaved with the psql client output. I saw Tom write that new submissions for 7.4 have to be in before midnight local time, and since I'm on the east coast in the US, this just makes it in before the bell. :) Jon Jensen
* Have a go at fixing various outstanding portability issues in code thatTom Lane2003-07-23
| | | | | | | | | 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 ...
* Error message editing in backend/libpq, backend/postmaster, backend/tcop.Tom Lane2003-07-22
| | | | | Along the way, fix some logic problems in pgstat_initstats, notably the bogus assumption that malloc returns zeroed memory.
* > This change (I'm sure this will wrap poorly -- sorry):Bruce Momjian2003-06-25
| | | | | | | | | | | | | | | | | | | > 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
* IPv6 cleanups.Bruce Momjian2003-06-12
| | | | | Kurt Roeckx Andrew Dunstan
* Fix breakage induced by yours truly in Kerberos and PAM code.Tom Lane2003-04-25
|
* Another round of protocol changes. Backend-to-frontend messages now allTom Lane2003-04-22
| | | | | | | | | | have length words. COPY OUT reimplemented per new protocol: it doesn't need \. anymore, thank goodness. COPY BINARY to/from frontend works, at least as far as the backend is concerned --- libpq's PQgetline API is not up to snuff, and will have to be replaced with something that is null-safe. libpq uses message length words for performance improvement (no cycles wasted rescanning long messages), but not yet for error recovery.
* Second round of FE/BE protocol changes. Frontend->backend messages nowTom Lane2003-04-19
| | | | have length counts, and COPY IN data is packetized into messages.
* First phase of FE/BE protocol modifications: new StartupPacket layoutTom Lane2003-04-17
| | | | | | 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.
* Update FAQ's in head and 7.3.X.Bruce Momjian2003-02-14
|
* Fix for systems that don't have INET_ADDRSTRLEN.Peter Eisentraut2003-01-06
|
* Enable IPv6 connections to the server, and add pg_hba.conf IPv6 entriesBruce Momjian2003-01-06
| | | | | | | if the OS supports it. Code will still compile on non-IPv6-aware machines (feature added by Bruce). Nigel Kukard
* Back out V6 code, caused postmaster startup failure.Bruce Momjian2002-12-06
|
* We have just finished porting the old KAME IPv6 patch over toBruce Momjian2002-12-06
| | | | | | | | | | | postgresql version 7.3, but yea... this patch adds full IPv6 support to postgres. I've tested it out on 7.2.3 and has been running perfectly stable. CREDITS: The KAME Project (Initial patch) Nigel Kukard <nkukard@lbsd.net> Johan Jordaan <johanj@lando.co.za>
* Deal with cases where getpeereid _and_ another creditial method isBruce Momjian2002-12-03
| | | | supported.
* Guard against send-lots-and-lots-of-data DoS attack from unauthenticatedTom Lane2002-09-04
| | | | | users, by limiting the length of string we will accept for a password. Patch by Serguei Mokhov, some editorializing by Tom Lane.
* pgindent run.Bruce Momjian2002-09-04
|
* Remove sys/types.h in files that include postgres.h, and hence c.h,Bruce Momjian2002-09-02
| | | | because c.h has sys/types.h.
* Back out password packet length check.Bruce Momjian2002-08-30
| | | | Improve wording of pre-7.3 syntax mention.
* Prevent problem with extra-long password packets from allocating lots ofBruce Momjian2002-08-29
| | | | | | memory. Neil Conway
* Remove support for version-0 FE/BE protocol, per pghackers discussion.Tom Lane2002-08-29
| | | | This breaks support for 6.2 or older client libraries.
* The attached patch implements the password packet length sanity checkBruce Momjian2002-08-27
| | | | | | (using an elog(LOG) ), as well as includes a few more comment fixes. Neil Conway
* Add most of Neil Conway's cleanups.Bruce Momjian2002-08-27
|
* Add db-local user names, per discussion on hackers.Bruce Momjian2002-08-18
|
* Update copyright to 2002.Bruce Momjian2002-06-20
|
* Create an internal semaphore API that is not tied to SysV semaphores.Tom Lane2002-05-05
| | | | | | As proof of concept, provide an alternate implementation based on POSIX semaphores. Also push the SysV shared-memory implementation into a separate file so that it can be replaced conveniently.
* Authentication improvements:Bruce Momjian2002-04-04
| | | | | | | | | | | | | | A new pg_hba.conf column, USER Allow specifiction of lists of users separated by commas Allow group names specified by + Allow include files containing lists of users specified by @ Allow lists of databases, and database files Allow samegroup in database column to match group name matching dbname Removal of secondary password files Remove pg_passwd utility Lots of code cleanup in user.c and hba.c New data/global/pg_pwd format New data/global/pg_group file
* Prevent failed passwords from being echoed to server logs, for security.Bruce Momjian2002-03-05
|
* Prevent failed passwords from being echoed to server logs, for security.Bruce Momjian2002-03-05
|
* Further work on elog cleanup: fix some bogosities in elog's logic aboutTom Lane2002-03-04
| | | | | | | when to send what to which, prevent recursion by introducing new COMMERROR elog level for client-communication problems, get rid of direct writes to stderr in backend/libpq files, prevent non-error elogs from going to client during the authentication cycle.
* Commit to match discussed elog() changes. Only update is that LOG isBruce Momjian2002-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | now just below FATAL in server_min_messages. Added more text to highlight ordering difference between it and client_min_messages. --------------------------------------------------------------------------- REALLYFATAL => PANIC STOP => PANIC New INFO level the prints to client by default New LOG level the prints to server log by default Cause VACUUM information to print only to the client NOTICE => INFO where purely information messages are sent DEBUG => LOG for purely server status messages DEBUG removed, kept as backward compatible DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1 added DebugLvl removed in favor of new DEBUG[1-5] symbols New server_min_messages GUC parameter with values: DEBUG[5-1], INFO, NOTICE, ERROR, LOG, FATAL, PANIC New client_min_messages GUC parameter with values: DEBUG[5-1], LOG, INFO, NOTICE, ERROR, FATAL, PANIC Server startup now logged with LOG instead of DEBUG Remove debug_level GUC parameter elog() numbers now start at 10 Add test to print error message if older elog() values are passed to elog() Bootstrap mode now has a -d that requires an argument, like postmaster
* Fix for PAM error message display:Bruce Momjian2002-02-25
| | | | | | | > and that the right fix is to make each of the subsequent calls be in > this same pattern, not to try to emulate their nonsensical style. Dominic J. Eidson
* Heimdal support (Kerberos V implementation from KTH)Peter Eisentraut2002-02-23
|
* Avoid calling pq_flush just after sending AUTH_REQ_OK; this saves oneTom Lane2002-02-19
| | | | send() and probable process context swap during backend startup.
* New pgindent run with fixes suggested by Tom. Patch manually reviewed,Bruce Momjian2001-11-05
| | | | initdb/regression tests pass.
* Another pgindent run. Fixes enum indenting, and improves #endifBruce Momjian2001-10-28
| | | | spacing. Also adds space for one-line comments.
* pgindent run on all C files. Java run to follow. initdb/regressionBruce Momjian2001-10-25
| | | | tests pass.
* Fix authentication so that it doesn't record an extra 'PasswordTom Lane2001-10-18
| | | | | | | | | | authentication failed' and a 'send() failed: Broken pipe' message on every connection from psql in password auth mode. Problem is that psql doesn't ask user for a password until it sees a password challenge failure, and libpq just closes the connection unceremoniously if it's challenged for a password when it hasn't got one to send. Accordingly, EOF from the client after asking for a password is normal behavior and should not result in postmaster log entries.
* Disable local creds on OpenBSD because it doesn't support it. DocumentBruce Momjian2001-09-26
| | | | supported platforms in pg_hba.conf.
* Code review for MD5 authorization patch. Clean up some breakageTom Lane2001-09-21
| | | | (salts were always zero!?), add much missing documentation.
* Update SCM_CREDS for Net/Free/BSD-OS. Add configure checks.Bruce Momjian2001-09-07
|
* PAM authentication:Bruce Momjian2001-09-06
| | | | | | | | | | | | | | | | > pam_strerror() should be used a few more times, rather than just saying > "Error!". Also, the configure.in snippet seems wrong. You add > -I$pam_prefix/include/security to $INCLUDES and then you #include > <security/pam_appl.h>. This whole thing is probably unnecessary, since > PAM is a system library on the systems where it exists, so the headers > and libraries are found automatically, unlike OpenSSL and > Kerberos. See attached revised patch. (I'm sure the configure.in stuff can be done right/better, I'm just not enough of a autoconf guru to know what to change it to.) Dominic J. Eidson
* Add missing include for SCM_CREDS.Bruce Momjian2001-08-21
|
* Add SCM_CREDS to get owner of unix-domain socket on BSD-like systems.Bruce Momjian2001-08-21
|
* A little more code reorg for MD5/crypt.Bruce Momjian2001-08-17
|