[PORTS] Port Bug Report: ident authority map problem (fwd)

Started by Bruce Momjianabout 28 years ago2 messageshackers
Jump to latest
#1Bruce Momjian
bruce@momjian.us

Can someone comment on this?

Forwarded message:

From owner-pgsql-ports@hub.org Thu Mar 26 15:25:15 1998
Date: Thu, 26 Mar 1998 15:12:29 -0500 (EST)
From: Unprivileged user <nobody@hub.org>
Message-Id: <199803262012.PAA11300@hub.org>
To: pgsql-ports@postgreSQL.org
Reply-to: john edstrom <edstrom@slugo.hmsc.orst.edu>
Subject: [PORTS] Port Bug Report: ident authority map problem
Sender: owner-pgsql-ports@hub.org
Precedence: bulk

============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================

Your name : john edstrom
Your email address : edstrom@slugo.hmsc.orst.edu

Category : runtime: back-end
Severity : serious

Summary: ident authority map problem

System Configuration
--------------------
Operating System : linux 2.0.32 ELF

PostgreSQL version : 6.3.1

Compiler used : cc -v => gcc version egcs-2.90.23 980102 (egcs-1.0.1 release)

Hardware:
---------
Linux Poopsie.hmsc.orst.edu 2.0.32 #26 Wed Mar 18 17:11:39 PST 1998 i586 unknown

Versions of other tools:
------------------------
GNU Make version 3.76.1
flex version 2.5.4

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

Problem Description:
--------------------
postgres gets confused reading hba.conf. The last line
pg_hba.conf appears not to be read properly. Specifications
above the last line appear to be understood correctly.

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

Test Case:
----------
Here is how I do it.

3 lines in pg_hba.con

host edstrom 127.0.0.1 255.255.255.255 ident test
host all 127.0.0.1 255.255.255.255 ident pgsql
host tstdb 127.0.0.1 255.255.255.255 ident tst

4 lines in pg_ident.conf
tst edstrom edstrom
pgsql postgres postgres
test edstrom edstrom
test postgres postgres

Postgres and edstrom are unix accounts, tstdb is a valid
postgres user but not a unix account.

Around line 729 (verify_against_open_usermap()) in
src/backend/libpq/hba.c I put:

sprintf(PQerrormsg,"pg_ident: [%s] [%s] [%s] [%s] [%s] [%s]\n",
file_map, usermap_name,
file_pguser, pguser,
file_iuser, ident_username
);
fputs(PQerrormsg, stderr);
pqdebug("%s", PQerrormsg);

using psql from the command line user edstrom tries to
connect to tstdb ("psql tstdb") and is rejected. The error
log says:

->pg_ident: [tst] [pgsql] [edstrom] [edstrom] [edstrom] [edstrom]

pg_ident: [pgsql] [pgsql] [postgres] [edstrom] [postgres] [edstrom]
pg_ident: [test] [pgsql] [edstrom] [edstrom] [edstrom] [edstrom]
pg_ident: [test] [pgsql] [postgres] [edstrom] [postgres] [edstrom]
pg_ident: [] [pgsql] [] [edstrom] [] [edstrom]
pg_ident: [] [pgsql] [] [edstrom] [] [edstrom]
User authentication failed

The arrow shows where it should have succeeded. For some
It isn't cycling through usermap_name properly.

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

Solution:
---------

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

-- 
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)
#2John Edstrom
edstrom@bubo.hmsc.orst.edu
In reply to: Bruce Momjian (#1)
Re: [PORTS] Port Bug Report: ident authority map problem

Bruce Momjian

Are you still having problems? Can you check this again? Looks like it
is saying you are connecting via pgsql.

Yes on pgsql. I had the same problems with perlscripts, php/fi,
everything I tried.

Mercifully, this problem went away with the March 24 version. It
seems to have fixed the authid problem.

Now I have other problems... can't get perl modules to compile with
6.3.1 on DEC UNIX, bizzarro date/time problems on DEC UNIX,

______ on dec unix ----------
edstrom=> create table t(x time);
CREATE
edstrom=> insert into t values('12:12:12');
INSERT 27858 1
edstrom=> insert into t values('12:12:33');
ERROR: Second must be limited to values 0 through < 60 in '12:12:33'
edstrom=>

__________

Is that weird or what?

I can't get it built under machten at all...

It works fine on Linux though!

sigh!

============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================

Your name : john edstrom
Your email address : edstrom@slugo.hmsc.orst.edu

Category : runtime: back-end
Severity : serious

Summary: ident authority map problem

....

-- 
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
+  If your life is a hard drive,     |  (610) 353-9879(w)
+  Christ can be your backup.        |  (610) 853-3000(h)

je

--
John Edstrom | edstrom @ slugo.hmsc.orst.edu

http://www.hmsc.orst.edu/~edstrom
"Lurker" at BioMOO (bioinfo.weizmann.ac.il:8888)

Hatfield Marine Science Center
2030 S. Marine Science Drive
Newport, Oregon 97365-5296
wk: (541) 867 0197
fx: (541) 867 0138