*/
static NTSTATUS open_streams_for_delete(connection_struct *conn,
+ struct files_struct *dirfsp,
const struct smb_filename *smb_fname)
{
struct stream_struct *stream_info = NULL;
status = SMB_VFS_CREATE_FILE(
conn, /* conn */
NULL, /* req */
- NULL, /* dirfsp */
+ dirfsp, /* dirfsp */
smb_fname_cp, /* fname */
DELETE_ACCESS, /* access_mask */
(FILE_SHARE_READ | /* share_access */
* We can't open a file with DELETE access if any of the
* streams is open without FILE_SHARE_DELETE
*/
- status = open_streams_for_delete(conn, smb_fname);
+ status = open_streams_for_delete(conn, dirfsp, smb_fname);
if (!NT_STATUS_IS_OK(status)) {
goto fail;