Skip to content
Permalink
Browse files
fix: issue 1482 where the port was being added to the GSSAPI service …
…name (#1651)
  • Loading branch information
davecramer committed Dec 17, 2019
1 parent 23cce8a commit f7a55cf90c3152c982169a896e5e80d3a89fff52
Showing with 6 additions and 1 deletion.
  1. +6 −1 pgjdbc/src/main/java/org/postgresql/sspi/SSPIClient.java
@@ -103,8 +103,13 @@ private String makeSPN() throws PSQLException {
final HostSpec hs = pgStream.getHostSpec();

try {
/*
The GSSAPI implementation does not use the port in the service name.
Force the port number to 0
Fixes issue 1482
*/
return NTDSAPIWrapper.instance.DsMakeSpn(spnServiceClass, hs.getHost(), null,
(short) hs.getPort(), null);
(short) 0, null);
} catch (LastErrorException ex) {
throw new PSQLException("SSPI setup failed to determine SPN",
PSQLState.CONNECTION_UNABLE_TO_CONNECT, ex);

0 comments on commit f7a55cf

Please sign in to comment.