• C
    NFS: Fix auth flavor len accounting · 059f90b3
    Chuck Lever 提交于
    Previous logic in the NFS mount parsing code path assumed
    auth_flavor_len was set to zero for simple authentication flavors
    (like AUTH_UNIX), and 1 for compound flavors (like AUTH_GSS).
    
    At some earlier point (maybe even before the option parsers were
    merged?) specific checks for auth_flavor_len being zero were removed
    from the functions that validate the mount option that sets the mount
    point's authentication flavor.
    
    Since we are populating an array for authentication flavors, the
    auth_flavor_len should always be set to the number of flavors.  Let's
    eliminate some cleverness here, and prepare for new logic that needs
    to know the number of flavors in the auth_flavors[] array.
    
    (auth_flavors[] is an array because at some point we want to allow a
    list of acceptable authentication flavors to be specified via the sec=
    mount option.  For now it remains a single element array).
    Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
    Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
    059f90b3
super.c 70.6 KB