/*
* This file and its contents are supplied under the terms of the
* Common Development and Distribution License ("CDDL"), version 1.0.
* You may only use this file in accordance with the terms of version
* 1.0 of the CDDL.
*
* A full copy of the text of the CDDL should have accompanied this
* source. A copy of the CDDL is also available via the Internet at
*/
/*
* Copyright 2014 Nexenta Systems, Inc. All rights reserved.
*/
/*
* Dispatch function for SMB2_TREE_CONNECT
*/
#include <smbsrv/smb2_kproto.h>
{
int skip;
int rc = 0;
/*
* SMB2 Tree Connect request
*/
/* reserved */
&PathLength);
if (rc)
return (SDRC_ERROR);
/*
* We're normally positioned at the path name now,
* but there could be some padding before it.
*/
if (skip < 0)
return (SDRC_ERROR);
if (skip > 0)
/*
* Get the path name
*/
if (rc)
return (SDRC_ERROR);
if (status) {
return (SDRC_SUCCESS);
}
/*
* Report the share type.
*/
case STYPE_IPC:
break;
case STYPE_PRINTQ:
break;
case STYPE_DISKTREE:
default:
break;
}
/*
* XXX These need work..
*/
ShareFlags = 0;
Capabilities = 0;
/*
* SMB2 Tree Connect reply
*/
"wb.lll",
16, /* StructSize */ /* w */
ShareType, /* b */
ShareFlags, /* l */
Capabilities, /* l */
if (rc)
return (SDRC_ERROR);
return (SDRC_SUCCESS);
}