mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
smbd: inherit st_ex_mode to basename from stream name in create_file_unixpath()
This ensures smb_fname_base knows if it's a file or directory. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
d1726b8e22
commit
965c6d8911
@ -5716,7 +5716,7 @@ static NTSTATUS create_file_unixpath(connection_struct *conn,
|
||||
smb_fname_base = synthetic_smb_fname(talloc_tos(),
|
||||
smb_fname->base_name,
|
||||
NULL,
|
||||
NULL,
|
||||
&smb_fname->st,
|
||||
smb_fname->twrp,
|
||||
smb_fname->flags);
|
||||
if (smb_fname_base == NULL) {
|
||||
@ -5724,6 +5724,8 @@ static NTSTATUS create_file_unixpath(connection_struct *conn,
|
||||
goto fail;
|
||||
}
|
||||
|
||||
SET_STAT_INVALID(smb_fname_base->st);
|
||||
|
||||
/*
|
||||
* We may be creating the basefile as part of creating the
|
||||
* stream, so it's legal if the basefile doesn't exist at this
|
||||
|
Loading…
Reference in New Issue
Block a user