• Aurelien Aptel's avatar
    CIFS: Fix signing for SMB2/3 · 57f933ce
    Aurelien Aptel authored
    It seems Ronnie's preamble removal broke signing.
    
    the signing functions are called when:
    
    A) we send a request (to sign it)
    B) when we recv a response (to check the signature).
    
    On code path A, the smb2 header is in iov[1] but on code path B, the
    smb2 header is in iov[0] (and there's only one vector).
    
    So we have different iov indexes for the smb2 header but the signing
    function always use index 1. Fix this by checking the nb of io vectors
    in the signing function as a hint.
    Signed-off-by: default avatarAurelien Aptel <aaptel@suse.com>
    Reviewed-by: default avatarRonnie Sahlberg <lsahlber@redhat.com>
    Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
    57f933ce
smb2transport.c 17.1 KB