diff options
author | Volker Lendecke <vl@samba.org> | 2013-04-12 11:26:27 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2013-04-17 14:49:59 -0700 |
commit | 987ebb15918a10fd17bf784a054499111d4ad4e5 (patch) | |
tree | 90d5c567359fb96b7f81d7b40daa6fbc94fcc682 /source3 | |
parent | 441467c26621f245a7f71f4280e2c44afb30118f (diff) | |
download | samba-987ebb15918a10fd17bf784a054499111d4ad4e5.tar.gz samba-987ebb15918a10fd17bf784a054499111d4ad4e5.tar.bz2 samba-987ebb15918a10fd17bf784a054499111d4ad4e5.zip |
vfs: Convert stream_dir to synthetic_smb_fname
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/modules/vfs_streams_depot.c | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/source3/modules/vfs_streams_depot.c b/source3/modules/vfs_streams_depot.c index 620a580753..b74e774f08 100644 --- a/source3/modules/vfs_streams_depot.c +++ b/source3/modules/vfs_streams_depot.c @@ -124,7 +124,6 @@ static char *stream_dir(vfs_handle_struct *handle, uint8 id_buf[16]; bool check_valid; const char *rootdir; - NTSTATUS status; check_valid = lp_parm_bool(SNUM(handle->conn), "streams_depot", "check_valid", true); @@ -142,14 +141,12 @@ static char *stream_dir(vfs_handle_struct *handle, /* Stat the base file if it hasn't already been done. */ if (base_sbuf == NULL) { - struct smb_filename *smb_fname_base = NULL; + struct smb_filename *smb_fname_base; - status = create_synthetic_smb_fname(talloc_tos(), - smb_fname->base_name, - NULL, NULL, - &smb_fname_base); - if (!NT_STATUS_IS_OK(status)) { - errno = map_errno_from_nt_status(status); + smb_fname_base = synthetic_smb_fname( + talloc_tos(), smb_fname->base_name, NULL, NULL); + if (smb_fname_base == NULL) { + errno = ENOMEM; goto fail; } if (SMB_VFS_NEXT_STAT(handle, smb_fname_base) == -1) { @@ -188,10 +185,9 @@ static char *stream_dir(vfs_handle_struct *handle, return NULL; } - status = create_synthetic_smb_fname(talloc_tos(), result, NULL, NULL, - &smb_fname_hash); - if (!NT_STATUS_IS_OK(status)) { - errno = map_errno_from_nt_status(status); + smb_fname_hash = synthetic_smb_fname(talloc_tos(), result, NULL, NULL); + if (smb_fname_hash == NULL) { + errno = ENOMEM; goto fail; } @@ -239,13 +235,11 @@ static char *stream_dir(vfs_handle_struct *handle, goto fail; } - status = create_synthetic_smb_fname(talloc_tos(), - newname, - NULL, NULL, - &smb_fname_new); + smb_fname_new = synthetic_smb_fname( + talloc_tos(), newname, NULL, NULL); TALLOC_FREE(newname); - if (!NT_STATUS_IS_OK(status)) { - errno = map_errno_from_nt_status(status); + if (smb_fname_new == NULL) { + errno = ENOMEM; goto fail; } |