mirror of
https://github.com/samba-team/samba.git
synced 2025-01-25 06:04:04 +03:00
smbd: If an smb_filename already has a pathref fsp don't overwrite it.
That leaks fsps. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
8559af6316
commit
e7f1588ee4
@ -414,6 +414,13 @@ NTSTATUS openat_pathref_fsp(const struct files_struct *dirfsp,
|
||||
|
||||
DBG_DEBUG("smb_fname [%s]\n", smb_fname_str_dbg(smb_fname));
|
||||
|
||||
if (smb_fname->fsp != NULL) {
|
||||
/* We already have one for this name. */
|
||||
DBG_DEBUG("smb_fname [%s] already has a pathref fsp.\n",
|
||||
smb_fname_str_dbg(smb_fname));
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
if (file_existed && S_ISLNK(smb_fname->st.st_ex_mode)) {
|
||||
return NT_STATUS_STOPPED_ON_SYMLINK;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user