summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2013-04-15 10:50:53 +0200
committerJeremy Allison <jra@samba.org>2013-04-17 14:50:00 -0700
commit381bd97f1307e827ff19721808ba303f292a8d4f (patch)
tree24bced58d6f3ab98c1bb49986bb0d498fb77183c
parentedb7293020737b7dc6aeaf98654f58a8d4c34227 (diff)
downloadsamba-381bd97f1307e827ff19721808ba303f292a8d4f.tar.gz
samba-381bd97f1307e827ff19721808ba303f292a8d4f.tar.bz2
samba-381bd97f1307e827ff19721808ba303f292a8d4f.zip
smbd: Convert smb_set_file_dosmode to synthetic_smb_fname
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r--source3/smbd/trans2.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 6186e5ce3f..a1b69fcfb4 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) {