Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Stephane Bortzmeyer <bortzmeyer@xxxxxx> 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

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux