summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_default.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 848440809c..258caf8299 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -1226,21 +1226,17 @@ static NTSTATUS vfswrap_streaminfo(vfs_handle_struct *handle,
ret = SMB_VFS_FSTAT(fsp, &sbuf);
}
else {
- struct smb_filename *smb_fname = NULL;
- NTSTATUS status;
+ struct smb_filename smb_fname;
+
+ ZERO_STRUCT(smb_fname);
+ smb_fname.base_name = discard_const_p(char, fname);
- status = create_synthetic_smb_fname(talloc_tos(), fname, NULL,
- NULL, &smb_fname);
- if (!NT_STATUS_IS_OK(status)) {
- return status;
- }
if (lp_posix_pathnames()) {
- ret = SMB_VFS_LSTAT(handle->conn, smb_fname);
+ ret = SMB_VFS_LSTAT(handle->conn, &smb_fname);
} else {
- ret = SMB_VFS_STAT(handle->conn, smb_fname);
+ ret = SMB_VFS_STAT(handle->conn, &smb_fname);
}
- sbuf = smb_fname->st;
- TALLOC_FREE(smb_fname);
+ sbuf = smb_fname.st;
}
if (ret == -1) {