From 3aa9e34c6d45f04610fec9fc4e748941b1b38205 Mon Sep 17 00:00:00 2001 From: Jonathan Turner Date: Fri, 26 Oct 2018 21:58:44 +0100 Subject: [PATCH] error checks --- client/TGSExchange.go | 3 +++ client/client.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/client/TGSExchange.go b/client/TGSExchange.go index 82927c12..6f6f1a54 100644 --- a/client/TGSExchange.go +++ b/client/TGSExchange.go @@ -68,6 +68,9 @@ func (cl *Client) GetServiceTicket(spn string) (messages.Ticket, types.Encryptio realm := cl.Config.ResolveRealm(princ.NameString[len(princ.NameString)-1]) tgt, skey, err := cl.sessionTGT(realm) + if err != nil { + return tkt, skey, err + } _, tgsRep, err := cl.TGSExchange(princ, realm, tgt, skey, false, 0) if err != nil { diff --git a/client/client.go b/client/client.go index ad161560..db8c672f 100644 --- a/client/client.go +++ b/client/client.go @@ -229,6 +229,9 @@ func (cl *Client) realmLogin(realm string) error { } } tgt, skey, err := cl.sessionTGT(cl.Credentials.Realm) + if err != nil { + return err + } spn := types.PrincipalName{ NameType: nametype.KRB_NT_SRV_INST,