From ddc9cb779f56476aaa1a85c4008c0b848dff4cf7 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Tue, 31 Oct 2023 10:05:30 +0100 Subject: [PATCH] smbd: s/FILE_ATTRIBUTES_INVALID/FILE_ATTRIBUTE_INVALID/g No idea what got me into having an "S" in the define when I added it. Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- libcli/smb/smb_constants.h | 2 +- source3/include/smb_macros.h | 2 +- source3/smbd/dosmode.c | 2 +- source3/smbd/files.c | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libcli/smb/smb_constants.h b/libcli/smb/smb_constants.h index ead047d924f..1d55a555157 100644 --- a/libcli/smb/smb_constants.h +++ b/libcli/smb/smb_constants.h @@ -329,7 +329,7 @@ enum csc_policy { #define FLAGS2_UNICODE_STRINGS 0x8000 /* FileAttributes (search attributes) field */ -#define FILE_ATTRIBUTES_INVALID 0x0000L +#define FILE_ATTRIBUTE_INVALID 0x0000L #define FILE_ATTRIBUTE_READONLY 0x0001L #define FILE_ATTRIBUTE_HIDDEN 0x0002L #define FILE_ATTRIBUTE_SYSTEM 0x0004L diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h index f9aaf786ed3..3a942f9df11 100644 --- a/source3/include/smb_macros.h +++ b/source3/include/smb_macros.h @@ -103,7 +103,7 @@ #define VALID_STAT_OF_DIR(st) (VALID_STAT(st) && S_ISDIR((st).st_ex_mode)) #define SET_STAT_INVALID(st) { \ (st).st_ex_nlink = 0; \ - (st).cached_dos_attributes = FILE_ATTRIBUTES_INVALID; \ + (st).cached_dos_attributes = FILE_ATTRIBUTE_INVALID; \ }; /* Macros to get at offsets within smb_lkrng and smb_unlkrng diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c index c76a27dc71d..b388b5dc581 100644 --- a/source3/smbd/dosmode.c +++ b/source3/smbd/dosmode.c @@ -710,7 +710,7 @@ uint32_t fdos_mode(struct files_struct *fsp) return FILE_ATTRIBUTE_NORMAL; } - if (fsp->fsp_name->st.cached_dos_attributes != FILE_ATTRIBUTES_INVALID) { + if (fsp->fsp_name->st.cached_dos_attributes != FILE_ATTRIBUTE_INVALID) { return fsp->fsp_name->st.cached_dos_attributes; } diff --git a/source3/smbd/files.c b/source3/smbd/files.c index 1bbf822df28..0c54ca37468 100644 --- a/source3/smbd/files.c +++ b/source3/smbd/files.c @@ -2038,7 +2038,7 @@ files_struct *file_fsp(struct smb_request *req, uint16_t fid) } req->chain_fsp = fsp; - fsp->fsp_name->st.cached_dos_attributes = FILE_ATTRIBUTES_INVALID; + fsp->fsp_name->st.cached_dos_attributes = FILE_ATTRIBUTE_INVALID; return fsp; } @@ -2085,7 +2085,7 @@ struct files_struct *file_fsp_get(struct smbd_smb2_request *smb2req, return NULL; } - fsp->fsp_name->st.cached_dos_attributes = FILE_ATTRIBUTES_INVALID; + fsp->fsp_name->st.cached_dos_attributes = FILE_ATTRIBUTE_INVALID; return fsp; } @@ -2101,7 +2101,7 @@ struct files_struct *file_fsp_smb2(struct smbd_smb2_request *smb2req, return NULL; } smb2req->compat_chain_fsp->fsp_name->st.cached_dos_attributes = - FILE_ATTRIBUTES_INVALID; + FILE_ATTRIBUTE_INVALID; return smb2req->compat_chain_fsp; } @@ -2231,7 +2231,7 @@ static NTSTATUS fsp_attach_smb_fname(struct files_struct *fsp, fsp->name_hash = name_hash; fsp->fsp_name = smb_fname_new; - fsp->fsp_name->st.cached_dos_attributes = FILE_ATTRIBUTES_INVALID; + fsp->fsp_name->st.cached_dos_attributes = FILE_ATTRIBUTE_INVALID; *_smb_fname = NULL; return NT_STATUS_OK; }