Re: [Auth] "ident" method and LDAP user accounts

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephane Bortzmeyer <bortzmeyer(at)nic(dot)fr>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [Auth] "ident" method and LDAP user accounts
Date: 2005-03-03 09:03:25
Message-ID: 18814.1109840605@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Stephane Bortzmeyer <bortzmeyer(at)nic(dot)fr> writes:
> The real issue is "Why PostgreSQL does not use getpwuid when
> getsockopt with SO_PEERCREED returns a numeric UID?"

Oh? I read in hba.c

if (getsockopt(sock, SOL_SOCKET, SO_PEERCRED, &peercred, &so_len) != 0 ||
so_len != sizeof(peercred))
{
/* We didn't get a valid credentials struct. */
ereport(LOG,
(errcode_for_socket_access(),
errmsg("could not get peer credentials: %m")));
return false;
}

pass = getpwuid(peercred.uid);

so it sure looks like we *are* using getpwuid.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Florian G. Pflug 2005-03-03 09:04:32 Re: [Auth] "ident" method and LDAP user accounts
Previous Message Stephane Bortzmeyer 2005-03-03 08:43:17 Re: [Auth] "ident" method and LDAP user accounts