From: Andrew Deason Date: Thu, 14 Apr 2011 19:36:36 +0000 (-0500) Subject: auth: Set correct flags in token_extractRxkad X-Git-Tag: upstream/1.8.0_pre1^2~3850 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=fa6339d7ffc884b5251b3afe947bc39be350c118;p=packages%2Fo%2Fopenafs.git auth: Set correct flags in token_extractRxkad The flags that token_extractRxkad returns are flags that are passed to ktc_SetToken, not the flags that are passed directly to the PSetTokens pioctl. So, we should be setting AFS_SETTOK_SETPAG, which is interpreted by ktc_SetToken. Change-Id: Id63ba4d5874e43c8d1f02817bf33975516a974be Reviewed-on: http://gerrit.openafs.org/4480 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: BuildBot --- diff --git a/src/auth/token.c b/src/auth/token.c index 3e884f256..bf0d351cd 100644 --- a/src/auth/token.c +++ b/src/auth/token.c @@ -276,8 +276,12 @@ token_extractRxkad(struct ktc_setTokenData *token, uToken.ktc_tokenUnion_u.at_kad.rk_ticket.rk_ticket_val, rxkadToken->ticketLen); - if (flags) - *flags = uToken.ktc_tokenUnion_u.at_kad.rk_primary_flag & ~0x8000; + if (flags) { + *flags = 0; + if ((token->flags & AFSTOKEN_EX_SETPAG)) { + *flags |= AFS_SETTOK_SETPAG; + } + } if (aclient) { strncpy(aclient->cell, token->cell, MAXKTCREALMLEN-1);