/*
* 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 2013 Nexenta Systems, Inc. All rights reserved.
*/
/*
* Dispatch function for SMB2_QUERY_INFO
*
* [MS-FSCC 2.5] If a file system does not implement ...
* an Information Classs, NT_STATUS_INVALID_PARAMETER...
*/
#include <smbsrv/smb2_kproto.h>
#include <smbsrv/smb_fsops.h>
{
switch (qi->qi_InfoClass) {
/* pg 153 */
case FileFsVolumeInformation: /* 1 */
break;
case FileFsSizeInformation: /* 3 */
break;
case FileFsDeviceInformation: /* 4 */
break;
case FileFsAttributeInformation: /* 5 */
break;
case FileFsControlInformation: /* 6 */
break;
case FileFsFullSizeInformation: /* 7 */
break;
case FileFsObjectIdInformation: /* 8 */
break;
default:
break;
}
return (status);
}
/*
* FileFsVolumeInformation
*/
{
return (NT_STATUS_INVALID_PARAMETER);
/*
* NT has the "supports objects" flag set to 1.
*/
(void) smb_mbc_encodef(
0LL, /* Volume creation time (q) */
LabelLength, /* (l) */
0, /* Supports objects (b) */
/* reserved (.) */
return (0);
}
/*
* FileFsSizeInformation
*/
{
int rc;
return (NT_STATUS_INVALID_PARAMETER);
if (rc)
return (smb_errno2status(rc));
(void) smb_mbc_encodef(
return (0);
}
/*
* FileFsFullSizeInformation
*/
{
int rc;
return (NT_STATUS_INVALID_PARAMETER);
if (rc)
return (smb_errno2status(rc));
(void) smb_mbc_encodef(
return (0);
}
/*
* FileFsDeviceInformation
*/
{
return (NT_STATUS_INVALID_PARAMETER);
(void) smb_mbc_encodef(
return (0);
}
/*
* FileFsAttributeInformation
*/
{
char *fsname;
/* This call is OK on all tree types. */
case STYPE_IPC:
fsname = "PIPE";
break;
case STYPE_DISKTREE:
break;
case STYPE_PRINTQ:
case STYPE_DEVICE:
default: /* gcc -Wuninitialized */
return (NT_STATUS_INVALID_PARAMETER);
}
/*
* Todo: Store the FsAttributes in the tree object,
* then just return that directly here.
*/
(void) smb_mbc_encodef(
MAXNAMELEN-1,
fsname);
return (0);
}
/*
* FileFsControlInformation
*/
{
return (NT_STATUS_INVALID_PARAMETER);
/*
* Strange error per. [MS-FSCC 2.5.2]
* which means quotas not supported.
*/
return (NT_STATUS_VOLUME_NOT_UPGRADED);
}
(void) smb_mbc_encodef(
0, /* free space start filtering - MUST be 0 */
0, /* free space threshold - MUST be 0 */
0, /* free space stop filtering - MUST be 0 */
SMB_QUOTA_UNLIMITED, /* default quota threshold */
SMB_QUOTA_UNLIMITED, /* default quota limit */
FILE_VC_QUOTA_ENFORCE, /* fs control flag */
0); /* pad bytes */
return (0);
}
/*
* FileFsObjectIdInformation
*/
/* ARGSUSED */
{
return (NT_STATUS_INVALID_PARAMETER);
}