/*
* 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 2014 Nexenta Systems, Inc. All rights reserved.
*/
#if !defined(_KERNEL) && !defined(_FAKE_KERNEL)
#include <string.h>
#include <strings.h>
#include <stddef.h>
#endif /* _KERNEL */
#include <smbsrv/smb_door.h>
#include <sys/sysmacros.h>
const xdrproc_t);
{
return (TRUE);
}
return (FALSE);
}
/*
* When decoding into a string, ensure that objp->buf is NULL or
* is pointing at a buffer large enough to receive the string.
* Don't leave it as an uninitialized pointer.
*
* If objp->buf is NULL, xdr_string will allocate memory for the
* string. Otherwise it will copy into the available buffer.
*/
{
return (FALSE);
return (TRUE);
}
const char *
{
struct {
const char *name;
} ops[] = {
{ SMB_DR_NULL, "null" },
{ SMB_DR_ASYNC_RESPONSE, "async_response" },
{ SMB_DR_USER_AUTH_LOGON, "user_auth_logon" },
{ SMB_DR_USER_NONAUTH_LOGON, "user_nonauth_logon" },
{ SMB_DR_USER_AUTH_LOGOFF, "user_auth_logoff" },
{ SMB_DR_LOOKUP_SID, "lookup_sid" },
{ SMB_DR_LOOKUP_NAME, "lookup_name" },
{ SMB_DR_JOIN, "join" },
{ SMB_DR_GET_DCINFO, "get_dcinfo" },
{ SMB_DR_VSS_GET_COUNT, "vss_get_count" },
{ SMB_DR_VSS_GET_SNAPSHOTS, "vss_get_snapshots" },
{ SMB_DR_VSS_MAP_GMTTOKEN, "vss_map_gmttoken" },
{ SMB_DR_ADS_FIND_HOST, "ads_find_host" },
{ SMB_DR_QUOTA_QUERY, "quota_query" },
{ SMB_DR_QUOTA_SET, "quota_set" },
{ SMB_DR_DFS_GET_REFERRALS, "dfs_get_referrals" },
{ SMB_DR_SHR_HOSTACCESS, "share_hostaccess" },
{ SMB_DR_SHR_EXEC, "share_exec" },
{ SMB_DR_NOTIFY_DC_CHANGED, "notify_dc_changed" }
};
int i;
}
return ("unknown");
}
/*
* Encode a door header structure into an XDR buffer.
*/
int
{
int rc = 0;
rc = -1;
xdr_destroy(&xdrs);
return (rc);
}
/*
* Decode an XDR buffer into a door header structure.
*/
int
{
int rc = 0;
rc = -1;
xdr_destroy(&xdrs);
return (rc);
}
{
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (TRUE);
}
/*
* Encode an smb_netuserinfo_t into a buffer.
*/
int
{
int rc = 0;
rc = -1;
xdr_destroy(&xdrs);
return (rc);
}
/*
* Decode an XDR buffer into an smb_netuserinfo_t.
*/
int
{
int rc = 0;
rc = -1;
xdr_destroy(&xdrs);
return (rc);
}
{
return (FALSE);
return (FALSE);
} else {
return (FALSE);
}
return (TRUE);
}
/*
*/
{
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (TRUE);
}
/*
* Encode an smb_netconnectinfo_t into a buffer.
*/
int
{
int rc = 0;
rc = -1;
xdr_destroy(&xdrs);
return (rc);
}
/*
* Decode an XDR buffer into an smb_netconnectinfo_t.
*/
int
{
int rc = 0;
rc = -1;
xdr_destroy(&xdrs);
return (rc);
}
/*
*/
{
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (TRUE);
}
/*
* Encode an smb_netfileinfo_t into a buffer.
*/
int
{
int rc = 0;
rc = -1;
xdr_destroy(&xdrs);
return (rc);
}
/*
* Decode an XDR buffer into an smb_netfileinfo_t.
*/
int
{
int rc = 0;
rc = -1;
xdr_destroy(&xdrs);
return (rc);
}
/*
*/
{
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (TRUE);
}
{
return (FALSE);
}
return (FALSE);
}
return (TRUE);
}
static bool_t
{
return (FALSE);
}
return (TRUE);
}
{
return (FALSE);
}
return (FALSE);
}
return (TRUE);
}
{
return (FALSE);
}
return (FALSE);
}
return (FALSE);
}
return (TRUE);
}
{
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (TRUE);
}
{
return (FALSE);
return (TRUE);
}
{
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (TRUE);
}
{
return (FALSE);
return (FALSE);
return (TRUE);
}
{
return (FALSE);
return (FALSE);
return (TRUE);
}
/*
* XDR a list_t list of elements
* offset - offset of list_node_t in list element
* elsize - size of list element
* elproc - XDR function for the list element
*/
{
void *node;
case XDR_ENCODE:
while (node) {
++count;
}
return (FALSE);
while (node) {
return (FALSE);
}
return (TRUE);
case XDR_DECODE:
return (FALSE);
while (count) {
return (FALSE);
return (FALSE);
--count;
}
return (TRUE);
case XDR_FREE:
}
return (TRUE);
}
return (FALSE);
}
{
}
{
return (FALSE);
return (FALSE);
return (TRUE);
}
{
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (TRUE);
}
{
}
{
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (TRUE);
}
{
return (FALSE);
return (FALSE);
return (TRUE);
}
{
return (FALSE);
return (FALSE);
return (TRUE);
}
{
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (TRUE);
}
{
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (TRUE);
}
/*
* The smbsrv ioctl callers include a CRC of the XDR encoded data,
* and kmod ioctl handler checks it. Both use this function. This
* is not really XDR related, but this is as good a place as any.
*/
{
uint8_t *p;
int i;
}
return (crc);
}