OpenAFS Master Repository branch, master, updated. BP-openafs-stable-1_8_x-394-gb027899

Gerrit Code Review gerrit@openafs.org
Fri, 5 Jul 2019 16:08:06 -0400


The following commit has been merged in the master branch:
commit b0278994826f6bd1dfebc39f26282b8fbdadf1a0
Author: Mark Vitale <mvitale@sinenomine.net>
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
    cellname instead.
    
    Introduced by commit 5ec5ad5dcca84e99e5f55987cc4f787cd482fdde 'New
    GetToken pioctl'.
    
    While here, add doxygen comments.
    
    Change-Id: Ifa226fa1c35b95bc32642870f73359f97a9f1d61
    Reviewed-on: https://gerrit.openafs.org/13599
    Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
    Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
    Reviewed-by: Andrew Deason <adeason@sinenomine.net>

 src/afs/afs_pioctl.c |   37 +++++++++++++++++++++++++++++++++++--
 1 files changed, 35 insertions(+), 2 deletions(-)

-- 
OpenAFS Master Repository