diff options
Diffstat (limited to 'source3/smbd/notify.c')
-rw-r--r-- | source3/smbd/notify.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/source3/smbd/notify.c b/source3/smbd/notify.c index e430fcfc04..0c75769594 100644 --- a/source3/smbd/notify.c +++ b/source3/smbd/notify.c @@ -367,20 +367,16 @@ void notify_fname(connection_struct *conn, uint32 action, uint32 filter, path += 2; } if (parent_dirname(talloc_tos(), path, &parent, &name)) { - struct smb_filename *smb_fname_parent = NULL; - NTSTATUS status; + struct smb_filename smb_fname_parent; - status = create_synthetic_smb_fname(talloc_tos(), parent, NULL, - NULL, &smb_fname_parent); - if (!NT_STATUS_IS_OK(status)) { - return; - } - if (SMB_VFS_STAT(conn, smb_fname_parent) != -1) { + ZERO_STRUCT(smb_fname_parent); + smb_fname_parent.base_name = parent; + + if (SMB_VFS_STAT(conn, &smb_fname_parent) != -1) { notify_onelevel(conn->notify_ctx, action, filter, - SMB_VFS_FILE_ID_CREATE(conn, &smb_fname_parent->st), + SMB_VFS_FILE_ID_CREATE(conn, &smb_fname_parent.st), name); } - TALLOC_FREE(smb_fname_parent); } fullpath = talloc_asprintf(talloc_tos(), "%s/%s", conn->connectpath, |