diff options
author | Jeremy Allison <jra@samba.org> | 2016-03-11 15:08:26 -0800 |
---|---|---|
committer | Uri Simchoni <uri@samba.org> | 2016-03-15 08:29:30 +0100 |
commit | 347d3aaf961774c3d90ac1e9b1ffd56fa6913118 (patch) | |
tree | 55906c2d46132694ccec20d420e8fbd79f07283a /source3/modules | |
parent | b10d3c644002e30ad1c76d21b8bdcb7dc8c0e5f2 (diff) | |
download | samba-347d3aaf961774c3d90ac1e9b1ffd56fa6913118.tar.gz |
s3:vfs: vfs_streams_xattr.c - Remove duplicate code. This is exactly vfs_stat_smb_basename().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Diffstat (limited to 'source3/modules')
-rw-r--r-- | source3/modules/vfs_streams_xattr.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c index 3887d9ffce8..d206db1086c 100644 --- a/source3/modules/vfs_streams_xattr.c +++ b/source3/modules/vfs_streams_xattr.c @@ -823,23 +823,10 @@ static NTSTATUS streams_xattr_streaminfo(vfs_handle_struct *handle, if ((fsp != NULL) && (fsp->fh->fd != -1)) { ret = SMB_VFS_FSTAT(fsp, &sbuf); - } - else { - struct smb_filename *smb_fname_base = NULL; - smb_fname_base = synthetic_smb_fname(talloc_tos(), - smb_fname->base_name, - NULL, - NULL); - if (smb_fname_base == NULL) { - return NT_STATUS_NO_MEMORY; - } - if (lp_posix_pathnames()) { - ret = SMB_VFS_LSTAT(handle->conn, smb_fname_base); - } else { - ret = SMB_VFS_STAT(handle->conn, smb_fname_base); - } - sbuf = smb_fname_base->st; - TALLOC_FREE(smb_fname_base); + } else { + ret = vfs_stat_smb_basename(handle->conn, + smb_fname->base_name, + &sbuf); } if (ret == -1) { |