The legacy GetToken compatibility code assumed that we would always
have at least one rxkad token for a cell, and segfaulted if we didn't.
Just return as if we have no tokens if a cell doesn't have an rxkad
token.
Change-Id: Ica64882c1a64cf140ad6c277c70fbfb747ea6235
Reviewed-on: http://gerrit.openafs.org/3614
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
}
token = afs_FindToken(tu->tokens, RX_SECIDX_KAD);
+ /* If they don't have an RXKAD token, but do have other tokens,
+ * then sadly there's nothing this interface can do to help them. */
+ if (token == NULL)
+ return ENOTCONN;
+
/* for compat, we try to return 56 byte tix if they fit */
iterator = token->rxkad.ticketLen;
if (iterator < 56)