]> granicus.if.org Git - libtirpc/commitdiff
PCSEC_GSS_SVC_PRIVACY failure.
authorMatthew N. Dodd <matthew.nygard.dodd@gmail.com>
Mon, 20 Jun 2011 17:32:58 +0000 (13:32 -0400)
committerSteve Dickson <steved@redhat.com>
Tue, 21 Jun 2011 18:31:44 +0000 (14:31 -0400)
in authgss_prot.c:xdr_rpc_gss_wrap_data(), gss_wrap() is called in the
svc == RPCSEC_GSS_SVC_PRIVACY conditional block with databuf.length
uninitialized.

Initialization performed in the svc == RPCSEC_GSS_SVC_INTEGRITY
conditional block should be moved.

Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
src/authgss_prot.c

index 9d7fa0922321f1165a637151b68ac5e295269e6d..0168318899148a13258983c9a60cbf473667aa88 100644 (file)
@@ -161,6 +161,7 @@ xdr_rpc_gss_wrap_data(XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr,
        databuflen = end - start - 4;
        XDR_SETPOS(xdrs, start + 4);
        databuf.value = XDR_INLINE(xdrs, databuflen);
+       databuf.length = databuflen;
 
        xdr_stat = FALSE;
 
@@ -169,7 +170,6 @@ xdr_rpc_gss_wrap_data(XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr,
                XDR_SETPOS(xdrs, start);
                if (!xdr_u_int(xdrs, (u_int *)&databuflen))
                        return (FALSE);
-               databuf.length = databuflen;
 
                /* Checksum rpc_gss_data_t. */
                maj_stat = gss_get_mic(&min_stat, ctx, qop,