2 /* Solaris Kerberos: gssrpc not supported */
3 #if 0 /************** Begin IFDEF'ed OUT *******************************/
4 #include <gssrpc/rpc.h>
7 #include <kadm5/kadm_rpc.h>
8 #endif /**************** END IFDEF'ed OUT *******************************/
10 #include "policy_db.h"
17 /* Solaris Kerberos: this function taken from MIT's src/lib/rpc/xdr.c */
19 xdr_u_int32(XDR
*xdrs
, uint32_t *up
)
27 return (xdr_u_long(xdrs
, &ul
));
30 if (!xdr_u_long(xdrs
, &ul
)) {
43 bool_t
xdr_nullstring(XDR
*xdrs
, char **objp
)
47 if (xdrs
->x_op
== XDR_ENCODE
) {
51 size
= strlen(*objp
) + 1;
53 if (! xdr_u_int(xdrs
, &size
)) {
61 } else if (*objp
== NULL
) {
62 *objp
= (char *) mem_alloc(size
);
68 return (xdr_opaque(xdrs
, *objp
, size
));
72 return (xdr_opaque(xdrs
, *objp
, size
));
77 mem_free(*objp
, size
);
88 xdr_osa_policy_ent_rec(XDR
*xdrs
, osa_policy_ent_t objp
)
92 objp
->version
= OSA_ADB_POLICY_VERSION_1
;
95 if (!xdr_int(xdrs
, &objp
->version
))
99 if (!xdr_int(xdrs
, &objp
->version
))
101 if (objp
->version
!= OSA_ADB_POLICY_VERSION_1
)
106 if(!xdr_nullstring(xdrs
, &objp
->name
))
108 if (!xdr_u_int32(xdrs
, &objp
->pw_min_life
))
110 if (!xdr_u_int32(xdrs
, &objp
->pw_max_life
))
112 if (!xdr_u_int32(xdrs
, &objp
->pw_min_length
))
114 if (!xdr_u_int32(xdrs
, &objp
->pw_min_classes
))
116 if (!xdr_u_int32(xdrs
, &objp
->pw_history_num
))
118 if (!xdr_u_int32(xdrs
, &objp
->policy_refcnt
))