Commit Graph

52 Commits

Author SHA1 Message Date
Bruce Momjian cc2b5e5815 Remove NT-specific file open defines by defining our own open macros for
"rb" and "wb".
2000-06-02 15:57:44 +00:00
Bruce Momjian 52f77df613 Ye-old pgindent run. Same 4-space tabs. 2000-04-12 17:17:23 +00:00
Tom Lane 341b328b18 Fix a bunch of minor portability problems and maybe-bugs revealed by
running gcc and HP's cc with warnings cranked way up.  Signed vs unsigned
comparisons, routines declared static and then defined not-static,
that kind of thing.  Tedious, but perhaps useful...
2000-03-17 02:36:41 +00:00
Tom Lane ecd0bfa81a Look Ma, no MAX_PARSE_BUFFER! (At least not in the backend.
pg_dump and interfaces/odbc still need some work.)
1999-10-23 03:13:33 +00:00
Bruce Momjian e0e7daef6d Lots of patches coming in from me today :-)
When drawing up a very simple "text-drawing" of how the negotiation is done,
I realised I had done this last part (fallback) in a very stupid way. Patch
#4 fixes this, and does it in a much better way.

Included is also the simple text-drawing of how the negotiation is done.

//Magnus
1999-09-27 03:13:16 +00:00
Bruce Momjian 3406901a29 Move some system includes into c.h, and remove duplicates. 1999-07-17 20:18:55 +00:00
Bruce Momjian a71802e12e Final cleanup. 1999-07-16 05:00:38 +00:00
Bruce Momjian a9591ce66a Change #include's to use <> and "" as appropriate. 1999-07-15 23:04:24 +00:00
Bruce Momjian 2e6b1e63a3 Remove unused #includes in *.c files. 1999-07-15 22:40:16 +00:00
Bruce Momjian 07842084fe pgindent run over code. 1999-05-25 16:15:34 +00:00
Bruce Momjian d6e33c8b07 Rename MAP_FILE to USERMAP_FILE for Digital Unix. 1999-05-10 15:17:17 +00:00
Tom Lane b5bcef683b Fix some miscellaneous places that were using raw open() or
fopen(), instead of going through fd.c ... naughty naughty.
1999-05-09 00:54:30 +00:00
Tom Lane 26139bb4a0 Improve error messages when a connection is rejected. 1999-04-16 04:59:03 +00:00
Bruce Momjian 6724a50787 Change my-function-name-- to my_function_name, and optimizer renames. 1999-02-13 23:22:53 +00:00
Bruce Momjian 7a6b562fdf Apply Win32 patch from Horak Daniel. 1999-01-17 06:20:06 +00:00
Marc G. Fournier df1468e251 Many more cleanups... 1998-12-14 06:50:32 +00:00
Bruce Momjian 772a596ed2 Summary
The ident() function in src/backend/libpq/hba.c doesn't cope when
postmaster is contacted on an IP alias. This patch fixes it.

 Malcolm Beattie
1998-10-02 16:18:20 +00:00
Bruce Momjian fa1a8d6a97 OK, folks, here is the pgindent output. 1998-09-01 04:40:42 +00:00
Bruce Momjian af74855a60 Renaming cleanup, no pgindent yet. 1998-09-01 03:29:17 +00:00
Bruce Momjian 6bd323c6b3 Remove un-needed braces around single statements. 1998-06-15 19:30:31 +00:00
Bruce Momjian d3d541996b Cleanup of 'sameuser' patch. 1998-06-13 05:14:56 +00:00
Bruce Momjian 3f372ee6b3 > I needed to do that for the web database that I'm setting up. We
have > 20000 users and each (potentially) needs a separate database
which is > only accessible to them. Rather than having 20000 lines
in pg_hba.conf, > I've patched Postgres so that the special token
"sameuser" in the > database field of pg_hba.conf allows access
only to the username which > is connecting.
1998-06-13 04:27:18 +00:00
Marc G. Fournier 22bd99e462 From: hankin <hankin@consultco.com>
a while back I posted a patch for pg_ident, the patch worked but I didn't
diagnose the problem properly.
on my compiler(gcc2.7.2) this compiles with no errors...

char buf[1000]; if(buf != '\0') {

...but it doesn't compare '\0' with the first char of buf.
1998-03-15 08:18:03 +00:00
Bruce Momjian a32450a585 pgindent run before 6.3 release, with Thomas' requested changes. 1998-02-26 04:46:47 +00:00
Marc G. Fournier 0227a4e114 From: "Denis V. Dmitrienko" <denis@null.net>
What it does:
It solves stupid problem with cyrillic charsets IP-based on-fly recoding.
take a look at /data/charset.conf for details.
You can use any tables for any charset.
Tables are from Russian Apache project.
Tables in this patch contains also Ukrainian characters.

Then run ./configure --enable-recode
1998-02-24 15:27:04 +00:00
Marc G. Fournier c4213aede1 From: Phil Thompson <phil@river-bank.demon.co.uk>
Cleanup patches for previous protocol changes patch
1998-01-27 03:25:14 +00:00
Marc G. Fournier d5bbe2aca5 From: Phil Thompson <phil@river-bank.demon.co.uk>
I've completed the patch to fix the protocol and authentication issues I
was discussing a couple of weeks ago.  The particular changes are:

- the protocol has a version number
- network byte order is used throughout
- the pg_hba.conf file is used to specify what method is used to
  authenticate a frontend (either password, ident, trust, reject, krb4
  or krb5)
- support for multiplexed backends is removed
- appropriate changes to man pages
- the -a switch to many programs to specify an authentication service
  no longer has any effect
- the libpq.so version number has changed to 1.1

The new backend still supports the old protocol so old interfaces won't
break.
1998-01-26 01:42:53 +00:00
Marc G. Fournier da72b903ff Major code cleanup following the pg_password insertion...
...malloc/free -> palloc/pfree
	...fopen/fclose -> AllocateFile/FreeFile
1997-12-09 03:11:25 +00:00
Bruce Momjian 725bbde05c Clean up indenting. 1997-11-10 05:16:00 +00:00
Bruce Momjian c17fa36d3c Add Unix domain socket support, from Goran Thyni, goran@bildbasen.se 1997-11-07 20:52:15 +00:00
Bruce Momjian 59f6a57e59 Used modified version of indent that understands over 100 typedefs. 1997-09-08 21:56:23 +00:00
Bruce Momjian 319dbfa736 Another PGINDENT run that changes variable indenting and case label indenting. Also static variable indenting. 1997-09-08 02:41:22 +00:00
Bruce Momjian 1ccd423235 Massive commit to run PGINDENT on all *.c and *.h files. 1997-09-07 05:04:48 +00:00
Bruce Momjian ed7a17dca0 Remove unneeded stat calls. 1997-08-27 03:48:50 +00:00
Bruce Momjian 022903f22e Reduce open() calls. Replace fopen() calls with calls to fd.c functions. 1997-08-18 02:15:04 +00:00
Bruce Momjian ea5b5357cd Remove more (void) and fix -Wall warnings. 1997-08-12 22:55:25 +00:00
Marc G. Fournier 3a7c93e7f3 From: Dan McGuirk <mcguirk@indirect.com>
Subject: [HACKERS] password authentication

This patch adds support for plaintext password authentication.  To use
it, you add a line like

host         all         0.0.0.0       0.0.0.0           password  pg_pwd.conf


to your pg_hba.conf, where 'pg_pwd.conf' is the name of a file containing
the usernames and password hashes in the format of the first two fields
of a Unix /etc/passwd file.  (Of course, you can use a specific database
name or IP instead.)

Then, to connect with a password through libpq, you use the PQconnectdb()
function, specifying the "password=" tag in the connect string and also
adding the tag "authtype=password".

I also added a command-line switch '-u' to psql that tells it to prompt
for a username and password and use password authentication.
1997-03-12 21:23:16 +00:00
Bruce Momjian 42efa28cf7 There are two prototypes for inet_aton, one in include/inet_aton.h, and
another one in Solaris' port-protos.h.

The following patch will bring inet_aton's prototype into scope for
Ultrix to silence a compilation warning.

If the intention is to have inet_aton's prototype in its own header
filer, the declaration in Solaris' port-protos.h should be removed.
If the declaration in port-protos.h is deemed to be the correct
place, a declaration should be added in Ultrix' port-protos.h

regards
Erik Bertelsen
1997-01-14 01:56:44 +00:00
Bruce Momjian 90ff767d14 I found the following bugs in the version 6.0 (dated 961229).
At least the first two should be fixed before the final release of 6.0.

1)      There is a mismatch between the type declared in the catalog for
        the input/output attributes of pg_type and the actual type of
        values stored in the table.  The type of typinput, typoutput,
        typsend and typreceive are declared oid (26) while the values are
        regproc (24).  The error was there also in previous versions but
        nobody noticed it until an Assert has been added in ExecEvalVar.
        The effect is that it is now impossible to replace the typoutput
        of existing data types with new procs.

2)      The identd hba fails after the first time because the data read
        from the identd socket is not zero-terminated and strlen reports
        an incorrect length if the stack contains garbage, which usually
        happens after the first connection has been made.

3)      The new initdb wants to create itself the data directory. This
        implies that the parent directory must be writable by postgres and
        this may not always be desirable.  A better solution would be to
        allow the directory to be created by root and then filled by initdb.
        It would also nice to have some reasonable default for PGLIB and
        PGDATA like the previous version did.  This applies also to the
        postmaster executable.
1997-01-10 17:40:07 +00:00
Bryan Henderson 9c0afeabb7 More stuff to make it compile on various ports. 1996-11-27 08:16:44 +00:00
Bryan Henderson 7bf3bae1a4 Add #include <sys/types.h> so it works with Ultrix's in.h 1996-11-16 08:09:16 +00:00
Bruce Momjian aaeef4d17d All external function definitions now have prototypes that are checked. 1996-11-10 03:06:38 +00:00
Marc G. Fournier a472a29bb4 I'm getting there, slowly :) 1996-11-06 08:48:33 +00:00
Marc G. Fournier ce4c0ce1de Some compile failure fixes from Keith Parks <emkxp01@mtcc.demon.co.uk> 1996-11-06 06:52:23 +00:00
Bryan Henderson 8ac872b26d Fix bogus format in two error messages. 1996-11-03 09:24:04 +00:00
Marc G. Fournier aed384f12d Quiet a compiler warning (see line 729+, retvalue) 1996-11-03 07:00:57 +00:00
Marc G. Fournier dd5b78f1c1 Remove 'unused variable `open_errno'' 1996-11-03 06:56:52 +00:00
Marc G. Fournier c9002ecb21 Produce a clean compile of backend... 1996-11-03 06:54:38 +00:00
Marc G. Fournier bdd07411b4 remove use of PORTNAME_* 1996-10-31 10:17:09 +00:00
Bryan Henderson aa1eac7979 Make a local isblank() function, since not all standard C libraries have it.
For sparc_solaris, add inet_aton prototype, since it isn't in the header
files included for the standard C library functions.
1996-10-28 09:03:50 +00:00