Skip site navigation (1) Skip section navigation (2)

Revised: Allow IDENT authentication on local connections

From: Helge Bahmann <bahmann(at)math(dot)tu-freiberg(dot)de>
To: pgsql-patches(at)postgresql(dot)org
Subject: Revised: Allow IDENT authentication on local connections
Date: 2001-08-01 00:35:00
Message-ID: Pine.LNX.4.21.0108010218500.17777-200000@lothlorien.stunet2.tu-freiberg.de (view raw or flat)
Thread:
Lists: pgsql-patches
Hello,

The attached patch features:
- allow "ident" as a keyword for local connections
- determine username of connecting process for unix domain sockets and
match them against usermaps
- autoconf and documentation

The above features are activated only if the os supports SO_PEERCRED.
For systems without SO_PEERCRED support there is no change. Integrating
other mechanisms to get the required information is straight-forward.

Preparing the patch took longer because there is a bug in the nightly tar
I used (hba.c around line 216):
---
	line = lnext(line);
	if (!line)
		auth_arg[0] = '\0';
	else
	{
/* !!! need token = lfirst(line) here, else we reuse the last one !!! */
		StrNCpy(auth_arg, token, MAX_AUTH_ARG - 1);
---
Fixed in the patch as well, so applying may fail if you fixed it yourself.

Happy hacking,
Helge

Attachment: pg-ident-local.diff
Description: text/plain (7.9 KB)

pgsql-patches by date

Next:From: Timothy H. KeittDate: 2001-08-01 02:27:17
Subject: Re: Fuzzy matching?
Previous:From: Paul RamseyDate: 2001-07-31 23:59:49
Subject: contrib/postgis spatial extensions

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group