[VOL-5486] Fix deprecated versions
Change-Id: I3e03ea246020547ae75fa92ce8cf5cbba7e8f3bb
Signed-off-by: Abhay Kumar <abhay.kumar@radisys.com>
diff --git a/vendor/github.com/jcmturner/gokrb5/v8/client/TGSExchange.go b/vendor/github.com/jcmturner/gokrb5/v8/client/TGSExchange.go
index e4571ce..fd01342 100644
--- a/vendor/github.com/jcmturner/gokrb5/v8/client/TGSExchange.go
+++ b/vendor/github.com/jcmturner/gokrb5/v8/client/TGSExchange.go
@@ -89,7 +89,12 @@
return tkt, skey, nil
}
princ := types.NewPrincipalName(nametype.KRB_NT_PRINCIPAL, spn)
- realm := cl.Config.ResolveRealm(princ.NameString[len(princ.NameString)-1])
+ realm := cl.spnRealm(princ)
+
+ // if we don't know the SPN's realm, ask the client realm's KDC
+ if realm == "" {
+ realm = cl.Credentials.Realm()
+ }
tgt, skey, err := cl.sessionTGT(realm)
if err != nil {
diff --git a/vendor/github.com/jcmturner/gokrb5/v8/client/network.go b/vendor/github.com/jcmturner/gokrb5/v8/client/network.go
index 634f015..688ad3a 100644
--- a/vendor/github.com/jcmturner/gokrb5/v8/client/network.go
+++ b/vendor/github.com/jcmturner/gokrb5/v8/client/network.go
@@ -2,7 +2,6 @@
import (
"encoding/binary"
- "errors"
"fmt"
"io"
"net"
@@ -173,7 +172,7 @@
}
return rb, nil
}
- return nil, errors.New("error in getting a TCP connection to any of the KDCs")
+ return nil, fmt.Errorf("error sending to a KDC: %s", strings.Join(errs, "; "))
}
// sendTCP sends bytes to connection over TCP.
diff --git a/vendor/github.com/jcmturner/gokrb5/v8/client/session.go b/vendor/github.com/jcmturner/gokrb5/v8/client/session.go
index f7654d0..7e1e65c 100644
--- a/vendor/github.com/jcmturner/gokrb5/v8/client/session.go
+++ b/vendor/github.com/jcmturner/gokrb5/v8/client/session.go
@@ -41,7 +41,9 @@
// Cancel the one in the cache and add this one.
i.mux.Lock()
defer i.mux.Unlock()
- i.cancel <- true
+ if i.cancel != nil {
+ i.cancel <- true
+ }
s.Entries[sess.realm] = sess
return
}