mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Arrange for the authentication request type to be preserved in
PGconn. Invent a new libpq connection-status function, PQconnectionUsedPassword() that returns true if the server demanded a password during authentication, false otherwise. This may be useful to clients in general, but is immediately useful to help plug a privilege escalation path in dblink. Per list discussion and design proposed by Tom Lane.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.235 2007/03/30 03:19:02 momjian Exp $ -->
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.236 2007/07/08 17:11:50 joe Exp $ -->
|
||||
|
||||
<chapter id="libpq">
|
||||
<title><application>libpq</application> - C Library</title>
|
||||
@ -1059,6 +1059,20 @@ SSL *PQgetssl(const PGconn *conn);
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><function>PQconnectionUsedPassword</function><indexterm><primary>PQconnectionUsedPassword</></></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Returns true (1) if the connection authentication method
|
||||
required a password to be supplied. Returns false (0)
|
||||
otherwise.
|
||||
<synopsis>
|
||||
bool PQconnectionUsedPassword(const PGconn *conn);
|
||||
</synopsis>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
|
Reference in New Issue
Block a user