summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-11-11 15:58:34 +0100
committerVolker Lendecke <vlendec@samba.org>2010-11-11 16:59:27 +0000
commite7970c02f345a4a5d63ab43c120277de70624c19 (patch)
treec340b3c5d008dc318f8d8c33300c79a75652f89a /source3
parentddd33f035199bce2fc9d8deb3c2c4ad627ad36d4 (diff)
downloadsamba-e7970c02f345a4a5d63ab43c120277de70624c19.tar.gz
samba-e7970c02f345a4a5d63ab43c120277de70624c19.tar.bz2
samba-e7970c02f345a4a5d63ab43c120277de70624c19.zip
s3: Make cli_set_ea_fnum return NTSTATUS
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Thu Nov 11 16:59:27 UTC 2010 on sn-devel-104
Diffstat (limited to 'source3')
-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;
}