• Mike Snitzer's avatar
    nfs: implement client support for NFS_LOCALIO_PROGRAM · 56bcd0f0
    Mike Snitzer authored
    The LOCALIO auxiliary RPC protocol consists of a single "UUID_IS_LOCAL"
    RPC method that allows the Linux NFS client to verify the local Linux
    NFS server can see the nonce (single-use UUID) the client generated and
    made available in nfs_common for subsequent lookup and verification
    by the NFS server.  If matched, the NFS server populates members in the
    nfs_uuid_t struct.  The NFS client then transfers these nfs_uuid_t
    struct member pointers to the nfs_client struct and cleans up the
    nfs_uuid_t struct.  See: fs/nfs/localio.c:nfs_local_probe()
    
    This protocol isn't part of an IETF standard, nor does it need to be
    considering it is Linux-to-Linux auxiliary RPC protocol that amounts
    to an implementation detail.
    
    Localio is only supported when UNIX-style authentication (AUTH_UNIX, aka
    AUTH_SYS) is used (enforced by fs/nfs/localio.c:nfs_local_probe()).
    
    The UUID_IS_LOCAL method encodes the client generated uuid_t in terms of
    the fixed UUID_SIZE (16 bytes).  The fixed size opaque encode and decode
    XDR methods are used instead of the less efficient variable sized
    methods.
    
    Having a nonce (single-use uuid) is better than using the same uuid
    for the life of the server, and sending it proactively by client
    rather than reactively by the server is also safer.
    Signed-off-by: default avatarMike Snitzer <snitzer@kernel.org>
    Co-developed-by: default avatarNeilBrown <neilb@suse.de>
    Signed-off-by: default avatarNeilBrown <neilb@suse.de>
    Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
    Signed-off-by: default avatarAnna Schumaker <anna.schumaker@oracle.com>
    56bcd0f0
localio.c 18.7 KB