smb_trans2_set_path_information.c revision 8c10a8659ac31335ed870a1711c0182623f72fd6
/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* SMB: trans2_set_path_information
*
* This request is used to set information about a specific file or
* subdirectory.
*
* Client Request Value
* ========================== =========================================
*
* WordCount 15
* MaxSetupCount 0
* SetupCount 1
* Setup[0] TRANS2_SET_PATH_INFORMATION
*
* Parameter Block Encoding Description
* ========================== =========================================
*
* USHORT InformationLevel; Level of information to set
* ULONG Reserved; Must be zero
* STRING FileName; File or directory name
*
* The following InformationLevels may be set:
*
* Information Level Value
* ========================== =========================================
*
* SMB_INFO_STANDARD 1
* SMB_INFO_QUERY_EA_SIZE 2
* SMB_INFO_QUERY_ALL_EAS 4
*
* The response formats are:
*
* 4.2.16.1 SMB_INFO_STANDARD & SMB_INFO_QUERY_EA_SIZE
*
* Parameter Block Encoding Description
* ================================== =================================
*
* USHORT Reserved 0
*
* Data Block Encoding Description
* ================================== =================================
*
* SMB_DATE CreationDate; Date when file was created
* SMB_TIME CreationTime; Time when file was created
* SMB_DATE LastAccessDate; Date of last file access
* SMB_TIME LastAccessTime; Time of last file access
* SMB_DATE LastWriteDate; Date of last write to the file
* SMB_TIME LastWriteTime; Time of last write to the file
* ULONG DataSize; File Size
* ULONG AllocationSize; Size of filesystem allocation
* unit
* USHORT Attributes; File Attributes
* ULONG EaSize; Size of file's EA information
* (SMB_INFO_QUERY_EA_SIZE)
*
* 4.2.16.2 SMB_INFO_QUERY_ALL_EAS
*
* Response Field Value
* ==================== ===============================================
*
* MaxDataCount Length of FEAlist found (minimum value is 4)
*
* Parameter Block Description
* Encoding ===============================================
* ====================
*
* USHORT EaErrorOffset Offset into EAList of EA error
*
* Data Block Encoding Description
* ==================== ===============================================
*
* ULONG ListLength; Length of the remaining data
* UCHAR EaList[] The extended attributes list
*
* Undocumented things:
* Poorly documented information levels. Information must be infered
* from other commands.
*
* NULL Attributes means don't set them. NT sets the high bit to
* set attributes to 0.
*/
#include <smbsrv/smb_incl.h>
#include <smbsrv/smb_fsops.h>
{
int rc = 0;
return (SDRC_ERROR);
}
return (SDRC_ERROR);
}
if (rc != 0) {
return (SDRC_ERROR);
}
0, 0);
if (rc != 0) {
return (SDRC_ERROR);
}
/*
* for the benefit of attribute setting later on
*/
}
if (status == NT_STATUS_DATA_ERROR)
return (SDRC_ERROR);
if (status == NT_STATUS_UNSUCCESSFUL) {
return (SDRC_ERROR);
}
return (SDRC_SUCCESS);
}