~ubuntu-branches/ubuntu/maverick/krb5/maverick

« back to all changes in this revision

Viewing changes to src/lib/kadm5/kadm_rpc_xdr.c

  • Committer: Bazaar Package Importer
  • Author(s): Sam Hartman
  • Date: 2009-05-07 16:16:34 UTC
  • mfrom: (13.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20090507161634-xqyk0s9na0le4flj
Tags: 1.7dfsg~beta1-4
When  decrypting the TGS response fails with the subkey, try with the
session key to work around Heimdal bug, Closes: #527353 

Show diffs side-by-side

added added

removed removed

Lines of Context:
220
220
 
221
221
 
222
222
 
 
223
static bool_t xdr_krb5_boolean(XDR *xdrs, krb5_boolean *kbool)
 
224
{
 
225
        bool_t val;
 
226
        
 
227
        switch (xdrs->x_op) {
 
228
        case XDR_DECODE:
 
229
             if (!xdr_bool(xdrs, &val))
 
230
                     return FALSE;
 
231
             
 
232
             *kbool = (val == FALSE) ? FALSE : TRUE;
 
233
             return TRUE;
 
234
             
 
235
        case XDR_ENCODE:
 
236
             val = *kbool ? TRUE : FALSE;
 
237
             return xdr_bool(xdrs, &val);
 
238
 
 
239
        case XDR_FREE:
 
240
             return TRUE;
 
241
        }
 
242
        
 
243
        return FALSE;
 
244
}
 
245
 
223
246
bool_t xdr_krb5_key_data_nocontents(XDR *xdrs, krb5_key_data *objp)
224
247
{
225
248
     /*
655
678
        if (!xdr_krb5_principal(xdrs, &objp->princ)) {
656
679
                return (FALSE);
657
680
        }
658
 
        if (!xdr_bool(xdrs, &objp->keepold)) {
 
681
        if (!xdr_krb5_boolean(xdrs, &objp->keepold)) {
659
682
                return (FALSE);
660
683
        }
661
684
        if (!xdr_array(xdrs, (caddr_t *)&objp->ks_tuple,
715
738
        if (!xdr_krb5_principal(xdrs, &objp->princ)) {
716
739
                return (FALSE);
717
740
        }
718
 
        if (!xdr_bool(xdrs, &objp->keepold)) {
 
741
        if (!xdr_krb5_boolean(xdrs, &objp->keepold)) {
719
742
                return (FALSE);
720
743
        }
721
744
        if (!xdr_array(xdrs, (caddr_t *) &objp->ks_tuple,
752
775
        if (!xdr_krb5_principal(xdrs, &objp->princ)) {
753
776
                return (FALSE);
754
777
        }
755
 
        if (!xdr_bool(xdrs, &objp->keepold)) {
 
778
        if (!xdr_krb5_boolean(xdrs, &objp->keepold)) {
756
779
                return (FALSE);
757
780
        }
758
781
        if (!xdr_array(xdrs, (caddr_t *)&objp->ks_tuple,