• Chuck Lever's avatar
    SUNRPC: Add XDR encoding helper for opaque_auth · 7b402c8d
    Chuck Lever authored
    RFC 5531 defines an MSG_ACCEPTED Reply message like this:
    
    	struct accepted_reply {
    		opaque_auth verf;
    		union switch (accept_stat stat) {
    		case SUCCESS:
    		   ...
    
    In the current server code, struct opaque_auth encoding is open-
    coded. Introduce a helper that encodes an opaque_auth data item
    within the context of a xdr_stream.
    
    Done as part of hardening the server-side RPC header decoding and
    encoding paths.
    Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
    Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
    7b402c8d
xdr.c 59.4 KB