OpenAFS Master Repository branch, master, updated. BP-openafs-stable-1_8_x-394-gb027899
Gerrit Code Review
Fri, 5 Jul 2019 16:08:06 -0400
The following commit has been merged in the master branch:
Author: Mark Vitale <email@example.com>
Date: Wed May 22 22:50:00 2019 -0400
auth: make PGetTokens2 work with 3-char cellnames
PGetTokens2 accepts two different types of input:
- an integer 'iterator' to request the nth token set for a user
- a string cellname to request the user's token set for that cell
Unfortunately, it distinguishes between these by assuming if the input
length is sizeof(afs_int32) (4 bytes), it must be an integer. This
assumption is incorrect if the cellname is three (3) characters long
plus a nul terminator.
The result is that the cellname string is interpreted as a very large
"n"; the subsequent search for the user's "very-large-nth-token" fails,
making it appear that the user has no valid token for this cell.
Improve on this heuristic by double-checking any putative integer input.
If it is actually a 3-character string, then process the input as a
Introduced by commit 5ec5ad5dcca84e99e5f55987cc4f787cd482fdde 'New
While here, add doxygen comments.
Reviewed-by: Michael Meffie <firstname.lastname@example.org>
Tested-by: BuildBot <email@example.com>
Reviewed-by: Cheyenne Wills <firstname.lastname@example.org>
Reviewed-by: Benjamin Kaduk <email@example.com>
Reviewed-by: Andrew Deason <firstname.lastname@example.org>
src/afs/afs_pioctl.c | 37 +++++++++++++++++++++++++++++++++++--
1 files changed, 35 insertions(+), 2 deletions(-)
OpenAFS Master Repository