summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/proto.h4
-rw-r--r--source3/libsmb/clifile.c10
-rw-r--r--source3/torture/torture.c6
3 files changed, 12 insertions, 8 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 69b59a1088..10409a40f5 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -2080,7 +2080,9 @@ NTSTATUS cli_raw_ioctl(struct cli_state *cli, uint16_t fnum, uint32_t code, DATA
NTSTATUS cli_set_ea_path(struct cli_state *cli, const char *path,
const char *ea_name, const char *ea_val,
size_t ea_len);
-bool cli_set_ea_fnum(struct cli_state *cli, uint16_t fnum, const char *ea_name, const char *ea_val, size_t ea_len);
+NTSTATUS cli_set_ea_fnum(struct cli_state *cli, uint16_t fnum,
+ const char *ea_name, const char *ea_val,
+ size_t ea_len);
struct tevent_req *cli_get_ea_list_path_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct cli_state *cli,
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index 23f9567f85..20babbd782 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -4151,18 +4151,18 @@ NTSTATUS cli_set_ea_path(struct cli_state *cli, const char *path,
Set an extended attribute on an fnum.
*********************************************************/
-bool cli_set_ea_fnum(struct cli_state *cli, uint16_t fnum, const char *ea_name, const char *ea_val, size_t ea_len)
+NTSTATUS cli_set_ea_fnum(struct cli_state *cli, uint16_t fnum,
+ const char *ea_name, const char *ea_val,
+ size_t ea_len)
{
uint8_t param[6];
- NTSTATUS status;
memset(param, 0, 6);
SSVAL(param,0,fnum);
SSVAL(param,2,SMB_INFO_SET_EA);
- status = cli_set_ea(cli, TRANSACT2_SETFILEINFO, param, 6,
- ea_name, ea_val, ea_len);
- return NT_STATUS_IS_OK(status);
+ return cli_set_ea(cli, TRANSACT2_SETFILEINFO, param, 6,
+ ea_name, ea_val, ea_len);
}
/*********************************************************
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 635eb5d867..24c7d7bc35 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -5209,8 +5209,10 @@ static bool run_eatest(int dummy)
slprintf(ea_name, sizeof(ea_name), "EA_%d", i);
memset(ea_val, (char)i+1, i+1);
- if (!cli_set_ea_fnum(cli, fnum, ea_name, ea_val, i+1)) {
- printf("ea_set of name %s failed - %s\n", ea_name, cli_errstr(cli));
+ status = cli_set_ea_fnum(cli, fnum, ea_name, ea_val, i+1);
+ if (!NT_STATUS_IS_OK(status)) {
+ printf("ea_set of name %s failed - %s\n", ea_name,
+ nt_errstr(status));
talloc_destroy(mem_ctx);
return False;
}