diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-06-24 16:26:23 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-06-24 16:26:23 +1000 |
commit | 6da26870e0ae5acd6ff49a30ec2f6886b44d095e (patch) | |
tree | 850c71039563c16a5d563c47e7ba2ab645baf198 /source3/libsmb/clirap.c | |
parent | 6925a799d04c6fa59dd2ddef1f5510f9bb7d17d1 (diff) | |
parent | 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 (diff) | |
download | samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.gz samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.bz2 samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.zip |
Merge 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 as Samba-4.0alpha16
Diffstat (limited to 'source3/libsmb/clirap.c')
-rw-r--r-- | source3/libsmb/clirap.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/source3/libsmb/clirap.c b/source3/libsmb/clirap.c index 8d1be2d66e..e5ff1abc18 100644 --- a/source3/libsmb/clirap.c +++ b/source3/libsmb/clirap.c @@ -23,7 +23,9 @@ #include "../libcli/auth/libcli_auth.h" #include "../librpc/gen_ndr/rap.h" #include "../lib/crypto/arcfour.h" +#include "../lib/util/tevent_ntstatus.h" #include "async_smb.h" +#include "libsmb/libsmb.h" #include "libsmb/clirap.h" #include "trans2.h" @@ -687,9 +689,6 @@ NTSTATUS cli_qpathinfo1(struct cli_state *cli, write_time, size, mode); fail: TALLOC_FREE(frame); - if (!NT_STATUS_IS_OK(status)) { - cli_set_error(cli, status); - } return status; } @@ -865,9 +864,6 @@ NTSTATUS cli_qpathinfo2(struct cli_state *cli, const char *fname, write_time, change_time, size, mode, ino); fail: TALLOC_FREE(frame); - if (!NT_STATUS_IS_OK(status)) { - cli_set_error(cli, status); - } return status; } @@ -979,9 +975,6 @@ NTSTATUS cli_qpathinfo_streams(struct cli_state *cli, const char *fname, pstreams); fail: TALLOC_FREE(frame); - if (!NT_STATUS_IS_OK(status)) { - cli_set_error(cli, status); - } return status; } @@ -1005,7 +998,7 @@ static bool parse_streams_blob(TALLOC_CTX *mem_ctx, const uint8_t *rdata, struct stream_struct *tmp; uint8_t *tmp_buf; - tmp = TALLOC_REALLOC_ARRAY(mem_ctx, streams, + tmp = talloc_realloc(mem_ctx, streams, struct stream_struct, num_streams+1); @@ -1030,7 +1023,7 @@ static bool parse_streams_blob(TALLOC_CTX *mem_ctx, const uint8_t *rdata, * convert_string_talloc?? */ - tmp_buf = TALLOC_ARRAY(streams, uint8_t, nlen+2); + tmp_buf = talloc_array(streams, uint8_t, nlen+2); if (tmp_buf == NULL) { goto fail; } @@ -1086,7 +1079,7 @@ NTSTATUS cli_qfilename(struct cli_state *cli, uint16_t fnum, char *name, return status; } - clistr_pull(cli->inbuf, name, rdata+4, namelen, IVAL(rdata, 0), + clistr_pull((const char *)rdata, name, rdata+4, namelen, IVAL(rdata, 0), STR_UNICODE); TALLOC_FREE(rdata); return NT_STATUS_OK; @@ -1247,9 +1240,6 @@ NTSTATUS cli_qpathinfo_basic(struct cli_state *cli, const char *name, status = cli_qpathinfo_basic_recv(req, sbuf, attributes); fail: TALLOC_FREE(frame); - if (!NT_STATUS_IS_OK(status)) { - cli_set_error(cli, status); - } return status; } |