From f91e0c857a5a44a5eab7696fafda758044739978 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Fri, 5 Oct 2018 16:52:32 +0200 Subject: [PATCH] vfs_fruit: fix error returns in ad_convert_xattr() Bug: https://bugzilla.samba.org/show_bug.cgi?id=13649 Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- source3/modules/vfs_fruit.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index 4c710bd2f99..aaaf5fde97e 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -985,14 +985,14 @@ static bool ad_convert_xattr(struct adouble *ad, !NT_STATUS_EQUAL(status, NT_STATUS_NONE_MAPPED)) { DBG_ERR("string_replace_allocate failed\n"); - return -1; + return false; } tmp = mapped_name; mapped_name = talloc_asprintf(talloc_tos(), ":%s", tmp); TALLOC_FREE(tmp); if (mapped_name == NULL) { - return -1; + return false; } stream_name = synthetic_smb_fname(talloc_tos(), @@ -1003,7 +1003,7 @@ static bool ad_convert_xattr(struct adouble *ad, TALLOC_FREE(mapped_name); if (stream_name == NULL) { DBG_ERR("synthetic_smb_fname failed\n"); - return -1; + return false; } DBG_DEBUG("stream_name: %s\n", smb_fname_str_dbg(stream_name)); @@ -1030,7 +1030,7 @@ static bool ad_convert_xattr(struct adouble *ad, TALLOC_FREE(stream_name); if (!NT_STATUS_IS_OK(status)) { DBG_ERR("SMB_VFS_CREATE_FILE failed\n"); - return -1; + return false; } nwritten = SMB_VFS_PWRITE(fsp, @@ -1042,12 +1042,12 @@ static bool ad_convert_xattr(struct adouble *ad, saved_errno = errno; close_file(NULL, fsp, ERROR_CLOSE); errno = saved_errno; - return -1; + return false; } status = close_file(NULL, fsp, NORMAL_CLOSE); if (!NT_STATUS_IS_OK(status)) { - return -1; + return false; } fsp = NULL; } -- 2.34.1