mirror of
https://github.com/samba-team/samba.git
synced 2025-03-20 22:50:26 +03:00
vfs_fruit: add fio->created
fio->created tracks whether a create created a stream. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13646 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 1e055a79541eb69eb2deeae897dde3665c5ffee2)
This commit is contained in:
parent
82783db2b1
commit
bc6d5c9fa7
@ -514,6 +514,9 @@ struct fio {
|
||||
|
||||
/* Denote stream type, meta or rsrc */
|
||||
adouble_type_t type;
|
||||
|
||||
/* Whether the create created the stream */
|
||||
bool created;
|
||||
};
|
||||
|
||||
/*
|
||||
@ -5860,6 +5863,7 @@ static NTSTATUS fruit_create_file(vfs_handle_struct *handle,
|
||||
NTSTATUS status;
|
||||
struct fruit_config_data *config = NULL;
|
||||
files_struct *fsp = NULL;
|
||||
struct fio *fio = NULL;
|
||||
|
||||
status = check_aapl(handle, req, in_context_blobs, out_context_blobs);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
@ -5910,6 +5914,11 @@ static NTSTATUS fruit_create_file(vfs_handle_struct *handle,
|
||||
goto fail;
|
||||
}
|
||||
|
||||
fio = (struct fio *)VFS_FETCH_FSP_EXTENSION(handle, fsp);
|
||||
if (fio != NULL && pinfo != NULL && *pinfo == FILE_WAS_CREATED) {
|
||||
fio->created = true;
|
||||
}
|
||||
|
||||
if (is_ntfs_stream_smb_fname(smb_fname)
|
||||
|| fsp->is_directory) {
|
||||
return status;
|
||||
|
Loading…
x
Reference in New Issue
Block a user