/*
* 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_SET_INFO
*
* [MS-FSCC 2.4] If a file system does not support ...
* an Information Classs, NT_STATUS_INVALID_PARAMETER...
*/
#include <smbsrv/smb2_kproto.h>
#include <smbsrv/smb_fsops.h>
{
switch (InfoClass) {
case FileBasicInformation: /* 4 */
break;
case FileRenameInformation: /* 10 */
break;
case FileLinkInformation: /* 11 */
break;
case FileDispositionInformation: /* 13 */
break;
case FilePositionInformation: /* 14 */
break;
case FileFullEaInformation: /* 15 */
break;
case FileModeInformation: /* 16 */
break;
case FileAllocationInformation: /* 19 */
break;
case FileEndOfFileInformation: /* 20 */
break;
case FilePipeInformation: /* 23 */
break;
case FileValidDataLengthInformation: /* 39 */
break;
case FileShortNameInformation: /* 40 */
break;
default:
break;
}
return (status);
}
/*
* FileRenameInformation
* See also: smb_set_rename_info()
*/
static uint32_t
{
char *fname;
int rc;
if (rc == 0) {
}
if (rc != 0)
return (NT_STATUS_INFO_LENGTH_MISMATCH);
return (NT_STATUS_INVALID_PARAMETER);
}
return (status);
}
/*
* FileLinkInformation
*/
static uint32_t
{
char *fname;
int rc;
if (rc == 0) {
}
if (rc != 0)
return (NT_STATUS_INFO_LENGTH_MISMATCH);
return (NT_STATUS_INVALID_PARAMETER);
}
return (status);
}
/*
* FilePositionInformation
*/
static uint32_t
{
return (NT_STATUS_INVALID_PARAMETER);
return (0);
}
/*
* FileFullEaInformation
* We could put EAs in a named stream...
*/
/* ARGSUSED */
static uint32_t
{
return (NT_STATUS_EAS_NOT_SUPPORTED);
}
/*
* FileModeInformation [MS-FSCC 2.4.24]
* FILE_WRITE_THROUGH
* FILE_SEQUENTIAL_ONLY
* FILE_NO_INTERMEDIATE_BUFFERING
* etc.
*/
static uint32_t
{
return (NT_STATUS_INVALID_PARAMETER);
#if 0 /* XXX - todo */
if (Mode & FILE_WRITE_THROUGH) {
/* store this in the ofile */
}
#endif
return (NT_STATUS_SUCCESS);
}
/*
* FilePipeInformation
*/
static uint32_t
{
&ReadMode, &CompletionMode) != 0)
return (NT_STATUS_INFO_LENGTH_MISMATCH);
case SMB_FTYPE_BYTE_PIPE:
case SMB_FTYPE_MESG_PIPE:
/*
* XXX: Do we need to actually do anything with
* ReadMode or CompletionMode? If so, (later)
* store these in the opipe object.
*
* See also: smb2_sif_pipe()
*/
status = 0;
break;
case SMB_FTYPE_DISK:
case SMB_FTYPE_PRINTER:
default:
}
return (status);
}
/*
* FileValidDataLengthInformation
*/
/* ARGSUSED */
static uint32_t
{
int rc;
return (NT_STATUS_INFO_LENGTH_MISMATCH);
if (rc != 0)
return (smb_errno2status(rc));
return (0);
}
/*
* FileShortNameInformation
* We can (optionally) support supply short names,
* but you can't change them.
*/
static uint32_t
{
return (NT_STATUS_INVALID_PARAMETER);
return (NT_STATUS_ACCESS_DENIED);
}