smb_token_xdr.c revision 6537f381d2d9e7b4e2f7b29c3e7a3f13be036f2e
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * CDDL HEADER START
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The contents of this file are subject to the terms of the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Common Development and Distribution License (the "License").
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * You may not use this file except in compliance with the License.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * See the License for the specific language governing permissions
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * and limitations under the License.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * When distributing Covered Code, include this CDDL HEADER in each
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * If applicable, add the following below this CDDL HEADER, with the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * fields enclosed by brackets "[]" replaced with your own identifying
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * information: Portions Copyright [yyyy] [name of copyright owner]
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * CDDL HEADER END
6537f381d2d9e7b4e2f7b29c3e7a3f13be036f2eas * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Use is subject to license terms.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#pragma ident "%Z%%M% %I% %E% SMI"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * This file was originally generated using rpcgen.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#endif /* !_KERNEL */
6537f381d2d9e7b4e2f7b29c3e7a3f13be036f2eas * chicken-and-egg: Can't use smb_sid_len() since it takes
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * SID as its parameter while sid is yet to be decoded.
6537f381d2d9e7b4e2f7b29c3e7a3f13be036f2eas if (!xdr_pointer(xdrs, sid, len, (xdrproc_t)xdr_smb_sid_t))
6537f381d2d9e7b4e2f7b29c3e7a3f13be036f2eas if (!xdr_pointer(xdrs, sid, len, (xdrproc_t)xdr_smb_sid_t))
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw if (!xdr_pointer(xdrs, privs, len, (xdrproc_t)xdr_smb_privset_t))
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw len = cnt * sizeof (smb_id_t) + sizeof (smb_win_grps_t);
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw if (!xdr_pointer(xdrs, grps, len, (xdrproc_t)xdr_smb_win_grps_t))
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw if (!xdr_vector(xdrs, (char *)objp->wg_groups, objp->wg_count,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw if (!xdr_vector(xdrs, (char *)objp->pg_grps, objp->pg_ngrps,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw cnt = ((smb_posix_grps_t *)(uintptr_t)*identity)->pg_ngrps;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw if (!xdr_pointer(xdrs, identity, len, (xdrproc_t)xdr_smb_posix_grps_t))
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw if (!xdr_array(xdrs, (char **)&objp->challenge_key.challenge_key_val,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw if (!xdr_array(xdrs, (char **)&objp->nt_password.nt_password_val,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw if (!xdr_array(xdrs, (char **)&objp->lm_password.lm_password_val,
6537f381d2d9e7b4e2f7b29c3e7a3f13be036f2eas if (!xdr_vector(xdrs, (char *)objp->sid_authority, NT_SID_AUTH_MAX,
6537f381d2d9e7b4e2f7b29c3e7a3f13be036f2eas if (!xdr_vector(xdrs, (char *)objp->sid_subauth, objp->sid_subauthcnt,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw if (!xdr_vector(xdrs, (char *)objp->priv, objp->priv_cnt,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw if (!xdr_smb_win_grps_helper(xdrs, (char **)&objp->tkn_win_grps))
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw if (!xdr_smb_privset_helper(xdrs, (char **)&objp->tkn_privileges))
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw sizeof (smb_session_key_t), (xdrproc_t)xdr_smb_session_key_t))
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw if (!xdr_smb_posix_grps_helper(xdrs, (char **)&objp->tkn_posix_grps))