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.
Showing
- doc/src/sgml/libpq.sgml 15 additions, 1 deletiondoc/src/sgml/libpq.sgml
- src/include/libpq/pqcomm.h 2 additions, 1 deletionsrc/include/libpq/pqcomm.h
- src/interfaces/libpq/exports.txt 2 additions, 1 deletionsrc/interfaces/libpq/exports.txt
- src/interfaces/libpq/fe-connect.c 17 additions, 1 deletionsrc/interfaces/libpq/fe-connect.c
- src/interfaces/libpq/libpq-fe.h 4 additions, 2 deletionssrc/interfaces/libpq/libpq-fe.h
- src/interfaces/libpq/libpq-int.h 2 additions, 1 deletionsrc/interfaces/libpq/libpq-int.h
Please register or sign in to comment