From 381bd97f1307e827ff19721808ba303f292a8d4f Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 15 Apr 2013 10:50:53 +0200 Subject: [PATCH] smbd: Convert smb_set_file_dosmode to synthetic_smb_fname Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source3/smbd/trans2.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 6186e5ce3f6..a1b69fcfb41 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -5721,7 +5721,7 @@ static NTSTATUS smb_set_file_dosmode(connection_struct *conn, const struct smb_filename *smb_fname, uint32 dosmode) { - struct smb_filename *smb_fname_base = NULL; + struct smb_filename *smb_fname_base; NTSTATUS status; if (!VALID_STAT(smb_fname->st)) { @@ -5729,11 +5729,10 @@ static NTSTATUS smb_set_file_dosmode(connection_struct *conn, } /* Always operate on the base_name, even if a stream was passed in. */ - status = create_synthetic_smb_fname(talloc_tos(), smb_fname->base_name, - NULL, &smb_fname->st, - &smb_fname_base); - if (!NT_STATUS_IS_OK(status)) { - return status; + smb_fname_base = synthetic_smb_fname( + talloc_tos(), smb_fname->base_name, NULL, &smb_fname->st); + if (smb_fname_base == NULL) { + return NT_STATUS_NO_MEMORY; } if (dosmode) { -- 2.11.4.GIT