auth/credentials: Handle ENOENT when obtaining ccache lifetime
authorStefan Metzmacher <metze@samba.org>
Fri, 3 Apr 2020 13:27:45 +0000 (15:27 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 9 Dec 2021 13:22:36 +0000 (13:22 +0000)
The new Heimdal may return ENOENT instead of KRB5_CC_END.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
auth/credentials/credentials_krb5.c

index d2e7a76a69e4af2ea42e1830d0649ee2220bef89..b4db5fc8fbdeaf20427e88992d2f33d880606010 100644 (file)
@@ -686,7 +686,7 @@ _PUBLIC_ int cli_credentials_get_named_ccache(struct cli_credentials *cred,
                bool expired = false;
                ret = smb_krb5_cc_get_lifetime(cred->ccache->smb_krb5_context->krb5_context,
                                               cred->ccache->ccache, &lifetime);
-               if (ret == KRB5_CC_END) {
+               if (ret == KRB5_CC_END || ret == ENOENT) {
                        /* If we have a particular ccache set, without
                         * an initial ticket, then assume there is a
                         * good reason */