From: Ralph Boehme Date: Tue, 26 Nov 2024 18:44:13 +0000 (+0100) Subject: smbd: rename SMB2_FILE_POSIX_INFORMATION to FSCC_FILE_POSIX_INFORMATION X-Git-Tag: tdb-1.4.13~467 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=27198998eda788ff0b4790036bb81480ae4319c1;p=thirdparty%2Fsamba.git smbd: rename SMB2_FILE_POSIX_INFORMATION to FSCC_FILE_POSIX_INFORMATION Streamline the info-level defines. Also get rid of SMB2_FILE_POSIX_INFORMATION_INTERNAL which is not needed for an info-level that is exclusive to SMB2. Signed-off-by: Ralph Boehme Reviewed-by: Volker Lendecke --- diff --git a/libcli/smb/smb_unix_ext.h b/libcli/smb/smb_unix_ext.h index ca0470672ab..72944d475af 100644 --- a/libcli/smb/smb_unix_ext.h +++ b/libcli/smb/smb_unix_ext.h @@ -417,6 +417,6 @@ enum smb_whoami_flags { #define INFO_LEVEL_IS_UNIX(level) ((((level) >= MIN_UNIX_INFO_LEVEL) && \ ((level) <= MAX_UNIX_INFO_LEVEL)) || \ - ((level) == SMB2_FILE_POSIX_INFORMATION_INTERNAL)) + ((level) == FSCC_FILE_POSIX_INFORMATION)) #endif /* __SMB_UNIX_EXT_H__ */ diff --git a/source3/include/trans2.h b/source3/include/trans2.h index 52b942eb963..9d5cfdea7e0 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -341,7 +341,7 @@ Byte offset Type name description #define FSCC_FILE_MAXIMUM_INFORMATION 55 /* As yet undefined FSCC_ code for POSIX info level. */ -#define SMB2_FILE_POSIX_INFORMATION 100 +#define FSCC_FILE_POSIX_INFORMATION 100 #define SMB2_FS_POSIX_INFORMATION 100 /* MS-FSCC 2.4 File System Information Classes */ @@ -412,7 +412,6 @@ Byte offset Type name description #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_ALL_INFORMATION (FSCC_FILE_ALL_INFORMATION + SMB2_INFO_SPECIAL) -#define SMB2_FILE_POSIX_INFORMATION_INTERNAL (SMB2_FILE_POSIX_INFORMATION + SMB2_INFO_SPECIAL) #define SMB2_FS_POSIX_INFORMATION_INTERNAL (SMB2_FS_POSIX_INFORMATION + NT_PASSTHROUGH_OFFSET) /* NT passthrough levels for qfsinfo. */ diff --git a/source3/smbd/smb2_getinfo.c b/source3/smbd/smb2_getinfo.c index 78222270099..f7802174cad 100644 --- a/source3/smbd/smb2_getinfo.c +++ b/source3/smbd/smb2_getinfo.c @@ -338,12 +338,12 @@ static struct tevent_req *smbd_smb2_getinfo_send(TALLOC_CTX *mem_ctx, file_info_level = SMB2_FILE_ALL_INFORMATION; break; - case SMB2_FILE_POSIX_INFORMATION: + case FSCC_FILE_POSIX_INFORMATION: if (!fsp->fsp_flags.posix_open) { tevent_req_nterror(req, NT_STATUS_INVALID_LEVEL); return tevent_req_post(req, ev); } - file_info_level = SMB2_FILE_POSIX_INFORMATION_INTERNAL; + file_info_level = in_file_info_class; break; default: diff --git a/source3/smbd/smb2_query_directory.c b/source3/smbd/smb2_query_directory.c index 2c8fb4a97c7..7e039c09605 100644 --- a/source3/smbd/smb2_query_directory.c +++ b/source3/smbd/smb2_query_directory.c @@ -372,7 +372,7 @@ static struct tevent_req *smbd_smb2_query_directory_send(TALLOC_CTX *mem_ctx, tevent_req_nterror(req, NT_STATUS_INVALID_LEVEL); return tevent_req_post(req, ev); } - state->info_level = SMB2_FILE_POSIX_INFORMATION; + state->info_level = FSCC_FILE_POSIX_INFORMATION; break; default: tevent_req_nterror(req, NT_STATUS_INVALID_INFO_CLASS); diff --git a/source3/smbd/smb2_trans2.c b/source3/smbd/smb2_trans2.c index 4fa72f34978..960c4d74821 100644 --- a/source3/smbd/smb2_trans2.c +++ b/source3/smbd/smb2_trans2.c @@ -1680,7 +1680,7 @@ static NTSTATUS smbd_marshall_dir_entry(TALLOC_CTX *ctx, /* SMB2 UNIX Extension. */ - case SMB2_FILE_POSIX_INFORMATION: + case FSCC_FILE_POSIX_INFORMATION: { struct smb3_file_posix_information info = {}; uint8_t buf[sizeof(info)]; @@ -1692,7 +1692,7 @@ static NTSTATUS smbd_marshall_dir_entry(TALLOC_CTX *ctx, enum ndr_err_code ndr_err; uint32_t tag = 0; - DBG_DEBUG("SMB2_FILE_POSIX_INFORMATION\n"); + DBG_DEBUG("FSCC_FILE_POSIX_INFORMATION\n"); p+= 4; SIVAL(p,0,reskey); p+= 4; @@ -3648,7 +3648,7 @@ NTSTATUS smbd_do_qfilepathinfo(connection_struct *conn, /* * SMB2 UNIX Extensions. */ - case SMB2_FILE_POSIX_INFORMATION_INTERNAL: + case FSCC_FILE_POSIX_INFORMATION: { struct smb3_file_posix_information info = {}; uint8_t buf[sizeof(info)];