mirror of
https://github.com/samba-team/samba.git
synced 2025-01-03 01:18:10 +03:00
smbd: rename SMB2_FS_POSIX_INFORMATION to FSCC_FS_POSIX_INFORMATION
Streamline the info-level defines. Also get rid of SMB2_FS_POSIX_INFORMATION_INTERNAL which is not needed for an info-level that is exclusive to SMB2. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
This commit is contained in:
parent
27198998ed
commit
239d8f463b
@ -342,7 +342,6 @@ Byte offset Type name description
|
|||||||
|
|
||||||
/* As yet undefined FSCC_ code for POSIX info level. */
|
/* As yet undefined FSCC_ code for POSIX info level. */
|
||||||
#define FSCC_FILE_POSIX_INFORMATION 100
|
#define FSCC_FILE_POSIX_INFORMATION 100
|
||||||
#define SMB2_FS_POSIX_INFORMATION 100
|
|
||||||
|
|
||||||
/* MS-FSCC 2.4 File System Information Classes */
|
/* MS-FSCC 2.4 File System Information Classes */
|
||||||
|
|
||||||
@ -356,6 +355,9 @@ Byte offset Type name description
|
|||||||
#define FSCC_FS_OBJECTID_INFORMATION 8
|
#define FSCC_FS_OBJECTID_INFORMATION 8
|
||||||
#define FSCC_FS_SECTOR_SIZE_INFORMATION 11
|
#define FSCC_FS_SECTOR_SIZE_INFORMATION 11
|
||||||
|
|
||||||
|
/* As yet undefined FSCC_ code for POSIX info level. */
|
||||||
|
#define FSCC_FS_POSIX_INFORMATION 100
|
||||||
|
|
||||||
/* NT passthrough levels... */
|
/* NT passthrough levels... */
|
||||||
|
|
||||||
#define NT_PASSTHROUGH_OFFSET 1000
|
#define NT_PASSTHROUGH_OFFSET 1000
|
||||||
@ -412,7 +414,6 @@ Byte offset Type name description
|
|||||||
#define SMB2_FILE_RENAME_INFORMATION_INTERNAL (FSCC_FILE_RENAME_INFORMATION + SMB2_INFO_SPECIAL)
|
#define SMB2_FILE_RENAME_INFORMATION_INTERNAL (FSCC_FILE_RENAME_INFORMATION + SMB2_INFO_SPECIAL)
|
||||||
#define SMB2_FILE_FULL_EA_INFORMATION (FSCC_FILE_FULL_EA_INFORMATION + SMB2_INFO_SPECIAL)
|
#define SMB2_FILE_FULL_EA_INFORMATION (FSCC_FILE_FULL_EA_INFORMATION + SMB2_INFO_SPECIAL)
|
||||||
#define SMB2_FILE_ALL_INFORMATION (FSCC_FILE_ALL_INFORMATION + SMB2_INFO_SPECIAL)
|
#define SMB2_FILE_ALL_INFORMATION (FSCC_FILE_ALL_INFORMATION + SMB2_INFO_SPECIAL)
|
||||||
#define SMB2_FS_POSIX_INFORMATION_INTERNAL (SMB2_FS_POSIX_INFORMATION + NT_PASSTHROUGH_OFFSET)
|
|
||||||
|
|
||||||
/* NT passthrough levels for qfsinfo. */
|
/* NT passthrough levels for qfsinfo. */
|
||||||
|
|
||||||
|
@ -5145,7 +5145,7 @@ static void cli_smb2_get_posix_fs_info_opened(struct tevent_req *subreq)
|
|||||||
state->cli,
|
state->cli,
|
||||||
state->fnum,
|
state->fnum,
|
||||||
SMB2_0_INFO_FILESYSTEM, /* in_info_type */
|
SMB2_0_INFO_FILESYSTEM, /* in_info_type */
|
||||||
SMB2_FS_POSIX_INFORMATION, /* in_file_info_class */
|
FSCC_FS_POSIX_INFORMATION, /* in_file_info_class */
|
||||||
0xFFFF, /* in_max_output_length */
|
0xFFFF, /* in_max_output_length */
|
||||||
NULL, /* in_input_buffer */
|
NULL, /* in_input_buffer */
|
||||||
0, /* in_additional_info */
|
0, /* in_additional_info */
|
||||||
|
@ -465,8 +465,15 @@ static struct tevent_req *smbd_smb2_getinfo_send(TALLOC_CTX *mem_ctx,
|
|||||||
int data_size = 0;
|
int data_size = 0;
|
||||||
size_t fixed_portion;
|
size_t fixed_portion;
|
||||||
|
|
||||||
/* the levels directly map to the passthru levels */
|
switch (in_file_info_class) {
|
||||||
file_info_level = in_file_info_class + NT_PASSTHROUGH_OFFSET;
|
case FSCC_FS_POSIX_INFORMATION:
|
||||||
|
file_info_level = in_file_info_class;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
/* the levels directly map to the passthru levels */
|
||||||
|
file_info_level = in_file_info_class + NT_PASSTHROUGH_OFFSET;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
status = smbd_do_qfsinfo(smb2req->xconn, conn, state,
|
status = smbd_do_qfsinfo(smb2req->xconn, conn, state,
|
||||||
file_info_level,
|
file_info_level,
|
||||||
|
@ -1960,7 +1960,7 @@ static bool fsinfo_unix_valid_level(connection_struct *conn,
|
|||||||
{
|
{
|
||||||
if (conn_using_smb2(conn->sconn) &&
|
if (conn_using_smb2(conn->sconn) &&
|
||||||
fsp->fsp_flags.posix_open &&
|
fsp->fsp_flags.posix_open &&
|
||||||
info_level == SMB2_FS_POSIX_INFORMATION_INTERNAL)
|
info_level == FSCC_FS_POSIX_INFORMATION)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -2473,7 +2473,7 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)bsize, (unsigned
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
case SMB_QUERY_POSIX_FS_INFO:
|
case SMB_QUERY_POSIX_FS_INFO:
|
||||||
case SMB2_FS_POSIX_INFORMATION_INTERNAL:
|
case FSCC_FS_POSIX_INFORMATION:
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
struct vfs_statvfs_struct svfs;
|
struct vfs_statvfs_struct svfs;
|
||||||
|
Loading…
Reference in New Issue
Block a user