OpenAFS Master Repository branch, master, updated. BP-openafs-stable-1_8_x-641-gd231134

Gerrit Code Review gerrit@openafs.org
Mon, 13 Jul 2020 16:52:01 -0400


The following commit has been merged in the master branch:
commit d231134aadcaf2bd3a91f26ba6d3d451713a6fba
Author: Andrew Deason <adeason@sinenomine.net>
Date:   Mon May 18 12:38:31 2020 -0500

    auth: Avoid cellconfig.c stdio renaming
    
    Since commit 35777145 (solaris-fopen-sucks-20060916), cellconfig.c has
    redirected fopen, fclose, and fgets to local functions on
    non-64bit-sparc Solaris, in order to work around that platform's stdio
    limitations.
    
    Commit 7c431f7571 (auth: retire writeconfig.c) moved the contents of
    writeconfig.c into cellconfig.c. The previous writeconfig.c contained
    some calls to stdio, including calling fprintf() on a pointer returned
    by fopen() in that file.
    
    Because fopen() was redirected to our local version, this means that
    afsconf_SetExtendedCellInfo() calls fopen() to get an
    afsconf_iobuffer*, and passes that pointer to the real system
    fprintf() later on (instead of a native FILE*). The compiler does warn
    about this, but this only happens on Solaris, where --enable-checking
    is not implemented, so the build never fails.
    
    To avoid this, remove the #defines for fopen, fgets, and fclose.
    Instead, change all of the old cellconfig.c callers to explicitly call
    afsconf_fopen, afsconf_fgets, and afsconf_fclose. On the affected
    Solaris platforms, we keep our local definitions, and for other
    platforms, we just make those functions call their system stdio
    equivalents. For the code that was pulled in from writeconfig.c,
    callers will just call the system fopen, fprintf, and fclose.
    
    We still keep our local afsconf_FILE* definition on all platforms, so
    the compiler will still do typechecking for our local afsconf_f*
    functions on all platforms. So now if we make a mistake, it should be
    a mistake on all platforms, so platforms with --enable-checking should
    flag the error.
    
    Change-Id: I4064d7f5ee82d5acab04a33b01c0603564a391e8
    Reviewed-on: https://gerrit.openafs.org/14214
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
    Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
    Tested-by: Mark Vitale <mvitale@sinenomine.net>
    Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>

 src/auth/cellconfig.c |   69 ++++++++++++++++++++++++++++++++++---------------
 1 files changed, 48 insertions(+), 21 deletions(-)

-- 
OpenAFS Master Repository