smb_query_information.c revision da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0
/*
* 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 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* SMB: query_information
*
* This request is sent to obtain information about a file.
*
* Client Request Description
* ================================== =================================
*
* UCHAR WordCount; Count of parameter words = 0
* USHORT ByteCount; Count of data bytes; min = 2
* UCHAR BufferFormat; 0x04
* STRING FileName[]; File name
*
* FileName is the fully qualified name of the file relative to the Tid in
* the header.
*
* Server Response Description
* ================================== =================================
*
* UCHAR WordCount; Count of parameter words = 10
* USHORT FileAttributes;
* UTIME LastWriteTime; Time of last write
* ULONG FileSize; File size
* USHORT Reserved [5]; Reserved - client should ignore
* USHORT ByteCount; Count of data bytes = 0
*
* FileAttributes are as described in the "Attributes Encoding" section of
* this document.
*
* Note that FileSize is limited to 32 bits, this request is inappropriate
* for files whose size is too large.
*
* NOTES:
* Some clients send a NULL file name. Right now we return ERRbadfile
* until we find out what a MS client would send...
*/
#include <smbsrv/smb_incl.h>
#include <smbsrv/smb_fsops.h>
int
{
int rc;
unsigned short dattr;
char *path;
char *name;
/* NOTREACHED */
}
/*
* Some MS clients pass NULL file names
* NT interprets this as "\"
*/
!= 0) {
/* NOTREACHED */
}
/* NOTREACHED */
}
10, /* wct */
write_time, /* Last write time */
file_size, /* FileSize */
0); /* bcc */
return (SDRC_NORMAL_REPLY);
}