smb_door_encdec.c revision 9fb67ea305c66b6a297583b9b0db6796b0dfe497
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <stdlib.h>
#include <strings.h>
#include <errno.h>
#include <syslog.h>
#include <smbsrv/smb_door.h>
/*
* Generic XDR encoder.
*
* Returns a malloc'd, encoded buffer upon success.
* Otherwise, returns NULL.
*/
char *
{
char *buf;
return (NULL);
}
*rsize = 0;
return (NULL);
}
*rsize = 0;
}
xdr_destroy(&xdrs);
return (buf);
}
/*
* Generic XDR decoder. Ensure that data is non-null and bzero'd.
*/
int
{
int rc = 0;
return (-1);
rc = -1;
xdr_destroy(&xdrs);
return (rc);
}
/*
* smb_kshare_mkselfrel
*
* encode: structure -> flat buffer (buffer size)
* Pre-condition: kshare is non-null.
*/
uint8_t *
{
if (!kshare)
return (NULL);
if (!buf)
return (NULL);
*len = 0;
}
xdr_destroy(&xdrs);
return (buf);
}
char *
{
goto smb_string_encode_failed;
}
goto smb_string_encode_failed;
}
xdr_destroy(&xdrs);
goto smb_string_encode_failed;
}
xdr_destroy(&xdrs);
if (rsize)
return (buf);
if (rsize)
*rsize = 0;
return (NULL);
}
int
{
int rc = 0;
rc = -1;
xdr_destroy(&xdrs);
return (rc);
}
/*
* Encode an lsa_account_t into a buffer.
*/
int
{
int rc = 0;
rc = -1;
xdr_destroy(&xdrs);
return (rc);
}
/*
* Decode an XDR buffer into an lsa_account_t.
*/
int
{
int rc = 0;
rc = -1;
xdr_destroy(&xdrs);
return (rc);
}
{
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (TRUE);
}