aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-auth.c
Commit message (Collapse)AuthorAge
...
* StrNCpy -> strlcpy (not complete)Peter Eisentraut2007-02-10
|
* Update CVS HEAD for 2007 copyright. Back branches are typically notBruce Momjian2007-01-05
| | | | back-stamped for this.
* pgindent run for 8.2.Bruce Momjian2006-10-04
|
* Fix bugs in plpgsql and ecpg caused by assuming that isspace() would onlyTom Lane2006-09-22
| | | | | | | | | 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.
* Remove 576 references of include files that were not needed.Bruce Momjian2006-07-14
|
* Revert part of recent include patch not ready for application.Bruce Momjian2006-07-14
|
* Add additional includes needed on some platforms.Bruce Momjian2006-07-14
|
* Clean up for warning:Joe Conway2006-07-12
| | | | | | | | | 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.
* Split definitions for md5.c out of crypt.h and into their own headerTom Lane2006-06-20
| | | | | | | | | 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.
* * Stephen Frost (sfrost@snowman.net) wrote:Bruce Momjian2006-03-06
| | | | | | | | | | | | | | | | | | | | | | | | | > 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
* Update copyright for 2006. Update scripts.Bruce Momjian2006-03-05
|
* Back out patch pending review.Bruce Momjian2006-02-12
| | | | | | | | | | | | | | | | | | | | | | | | | | --------------------------------------------------------------------------- > 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:
* > I've now tested this patch at home w/ 8.2HEAD and it seems to fix theBruce Momjian2006-02-12
| | | | | | | | | | | | | | | | | | | | | | | > 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:
* Rename pg_make_encrypted_password to PQencryptPassword.Peter Eisentraut2005-12-26
|
* Add an officially exported libpq function to encrypt passwords, andTom Lane2005-12-23
| | | | | modify the previous \password patch to use it instead of depending on a not-officially-exported function. Per discussion.
* Re-run pgindent, fixing a problem where comment lines after a blankBruce Momjian2005-11-22
| | | | | | | | | 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.
* I have applied the following patch to document PQinitSSL() andBruce Momjian2005-10-24
| | | | | | | | | | | 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().
* Clean up libpq's pollution of application namespace by renaming theTom Lane2005-10-17
| | | | | | 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.
* Standard pgindent run for 8.1.Bruce Momjian2005-10-15
|
* Fix Kerberos authentication in wake of virtual-hosts changes --- needTom Lane2005-10-08
| | | | | | | 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
* Fix a theoretical memory leak in pg_password_sendauth(). If the firstNeil Conway2005-06-30
| | | | | | | | 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.
* Remove support for Kerberos V4. It seems no one is using this, it hasNeil Conway2005-06-27
| | | | | some security issues, and upstream has declared it "dead". Patch from Magnus Hagander, minor editorialization from Neil Conway.
* Allow kerberos name and username case sensitivity to be specified fromBruce Momjian2005-06-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Kerberos fixes from Magnus Hagander --- in theory Kerberos 5 authTom Lane2005-03-25
| | | | | | 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.
* Add conditional inclusion of <com_err.h> to support old 'heimdal'Tom Lane2005-01-12
| | | | version of Kerberos. Per report from Reinhard Max.
* Clean up code in libpq that obtains user's home directory: make a singleTom Lane2005-01-04
| | | | | | 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.
* Tag appropriate files for rc3PostgreSQL Daemon2004-12-31
| | | | | | | | 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 ...
* Remove direct inclusions of <com_err.h> as well as configure test forTom Lane2004-12-20
| | | | | | | 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.
* Get rid of perror(), substitute some better phrased error messages.Peter Eisentraut2004-11-09
| | | | malloc() doesn't set errno, so most uses were buggy anyway.
* Allow pg_ctl to determine the server is up when getting a request for aBruce Momjian2004-10-16
| | | | | | | | password. Make password error message a #define and use it consistently. Sean Chittenden
* Revert patch that removed BUFSIZ usage. The memory has to hold theBruce Momjian2004-09-28
| | | | structures plus pointers used by the structure.
* Remove use of large BUFSIZ for buffers and use the proper struct sizes.Bruce Momjian2004-09-27
| | | | This greatly helps threaded libpq programs.
* Update copyright to 2004.Bruce Momjian2004-08-29
|
* Add thread locking to SSL and Kerberos connections.Bruce Momjian2004-03-24
| | | | | | | I have removed the docs mentioning that SSL and Kerberos are not thread-safe. Manfred Spraul
* More janitorial work: remove the explicit casting of NULL literals to aNeil Conway2004-01-07
| | | | | | | | 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.
* Dept. of third thoughts: in fact, libpq should support SCM_CREDS challengeTom Lane2003-12-20
| | | | | even when HAVE_GETPEEREID is defined, else it will be unable to connect to pre-7.4 backends that are using IDENT authentication.
* Fix broken IDENT support for FreeBSD (appears to have been broken byTom Lane2003-12-20
| | | | | ill-considered conditional logic in getpeereid patch of 3-Dec-2002). Per bug #1021.
* $Header: -> $PostgreSQL Changes ...PostgreSQL Daemon2003-11-29
|
* Cast field-length variables used in printf to int, because sometimesPeter Eisentraut2003-11-26
| | | | they might be of a wider type.
* Remove socket credentials defines not referenced.Bruce Momjian2003-10-25
|
* Update copyrights to 2003.Bruce Momjian2003-08-04
|
* pgindent run.Bruce Momjian2003-08-04
|
* > 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
* Make libpq thread-safe with configure --with-threads option.Bruce Momjian2003-06-14
| | | | Lee Kindness
* libpq can now talk to either 3.0 or 2.0 protocol servers. It first triesTom Lane2003-06-08
| | | | | | | 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.)
* Revert kerberos code breakage.Tom Lane2003-05-16
|
* Allow Win32 to compile under MinGW. Major changes are:Bruce Momjian2003-05-15
| | | | | | | | | | | | | | | 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
* 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.
* This patch fixes a bunch of spelling mistakes in comments throughout theTom Lane2003-03-10
| | | | | | PostgreSQL source code. Neil Conway