+static bool_t xdr_krb5_boolean(XDR *xdrs, krb5_boolean *kbool)
+{
+ bool_t val;
+
+ switch (xdrs->x_op) {
+ case XDR_DECODE:
+ if (!xdr_bool(xdrs, &val))
+ return FALSE;
+
+ *kbool = (val == FALSE) ? FALSE : TRUE;
+ return TRUE;
+
+ case XDR_ENCODE:
+ val = *kbool ? TRUE : FALSE;
+ return xdr_bool(xdrs, &val);
+
+ case XDR_FREE:
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
bool_t xdr_krb5_key_data_nocontents(XDR *xdrs, krb5_key_data *objp)
{
/*
if (!xdr_krb5_principal(xdrs, &objp->princ)) {
return (FALSE);
}
- if (!xdr_bool(xdrs, &objp->keepold)) {
+ if (!xdr_krb5_boolean(xdrs, &objp->keepold)) {
return (FALSE);
}
if (!xdr_array(xdrs, (caddr_t *)&objp->ks_tuple,
if (!xdr_krb5_principal(xdrs, &objp->princ)) {
return (FALSE);
}
- if (!xdr_bool(xdrs, &objp->keepold)) {
+ if (!xdr_krb5_boolean(xdrs, &objp->keepold)) {
return (FALSE);
}
if (!xdr_array(xdrs, (caddr_t *) &objp->ks_tuple,
if (!xdr_krb5_principal(xdrs, &objp->princ)) {
return (FALSE);
}
- if (!xdr_bool(xdrs, &objp->keepold)) {
+ if (!xdr_krb5_boolean(xdrs, &objp->keepold)) {
return (FALSE);
}
if (!xdr_array(xdrs, (caddr_t *)&objp->ks_tuple,