OpenAFS Master Repository branch, master, updated. openafs-devel-1_9_2-323-g4e6108b

Gerrit Code Review gerrit@openafs.org
Thu, 25 Sep 2025 18:04:15 -0400


The following commit has been merged in the master branch:
commit 4e6108b60d38082f37eda274e5804cd67a4894ff
Author: Mark Vitale <mvitale@sinenomine.net>
Date:   Wed Aug 20 19:53:51 2025 -0400

    DARWIN: Detect serverless CSDB cells in prefpane
    
    Since commit 694c5ca3f400 (OSX Preference Pane Source Import), saving
    CellServDB from the prefpane editor panel results in corruption of all
    CellServDB entries with no servers (which specifies that DNS AFSDB/SRV
    records should be used).
    
    For example, cell ams.cern.ch:
    
    [...]
        >ams.cern.ch    #AMS Experiment
        >epfl.ch        #Swiss Federal Institute of Technology at Lausanne
        128.178.109.111                 #kd1.epfl.ch
    [...]
    
    will gain an invalid "server" after saving the CellServDB:
    
    [...]
        >ams.cern.ch    #AMS Experiment
        AMS #AMS
        >epfl.ch        #Swiss Federal Institute of Technology at Lausanne
        128.178.109.111                 #kd1.epfl.ch
    [...]
    
    The way this parsing normally works, our scanUpToString:@">" call will
    collect all characters from after the newline after "#AMS Experiment"
    until the next ">" for the next cell, which contains the lines for the
    servers for that cell.
    
    But if the very next character is ">", then the scanUpToString:@">" does
    nothing (and returns false), so our tmpString still contains "AMS
    Experiment". We then pass that string to scanIpForCell:, which expects a
    string like
        "192.0.2.5 # db1.example.com\n192.0.2.6 # db2.example.com\n"
    
    since the string instead contains the cell comment "AMS Experiment", it
    gets misinterpreted by scanIpForCell: and we write out a CellServDB
    entry with a fake extra server.
    
    To fix this, clear tmpString before getting the list of servers, so we
    can detect when there were no servers defined for the cell and preserve
    that fact.
    
    While here, fix a typo and some adjacent whitespace.
    
    Change-Id: I3b1d4048791e8071075822dce08e193f85626bf4
    Reviewed-on: https://gerrit.openafs.org/16516
    Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
    Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Andrew Deason <adeason@sinenomine.net>

 src/platform/DARWIN/AFSPreference/AFSPropertyManager.m | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

-- 
OpenAFS Master Repository