summaryrefslogtreecommitdiff
path: root/source4/libcli/composite
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/composite')
-rw-r--r--source4/libcli/composite/connect.c16
-rw-r--r--source4/libcli/composite/loadfile.c12
-rw-r--r--source4/libcli/composite/savefile.c10
-rw-r--r--source4/libcli/composite/sesssetup.c8
4 files changed, 23 insertions, 23 deletions
diff --git a/source4/libcli/composite/connect.c b/source4/libcli/composite/connect.c
index bc39cc99fc..bdb1b4d263 100644
--- a/source4/libcli/composite/connect.c
+++ b/source4/libcli/composite/connect.c
@@ -53,7 +53,7 @@ static void composite_handler(struct smbcli_composite *);
static NTSTATUS connect_send_negprot(struct smbcli_composite *c,
struct smb_composite_connect *io)
{
- struct connect_state *state = c->private;
+ struct connect_state *state = talloc_get_type(c->private, struct connect_state);
state->req = smb_raw_negotiate_send(state->transport, lp_maxprotocol());
NT_STATUS_HAVE_NO_MEMORY(state->req);
@@ -72,7 +72,7 @@ static NTSTATUS connect_send_negprot(struct smbcli_composite *c,
static NTSTATUS connect_tcon(struct smbcli_composite *c,
struct smb_composite_connect *io)
{
- struct connect_state *state = c->private;
+ struct connect_state *state = talloc_get_type(c->private, struct connect_state);
NTSTATUS status;
status = smb_tree_connect_recv(state->req, c, state->io_tcon);
@@ -104,7 +104,7 @@ static NTSTATUS connect_tcon(struct smbcli_composite *c,
static NTSTATUS connect_session_setup(struct smbcli_composite *c,
struct smb_composite_connect *io)
{
- struct connect_state *state = c->private;
+ struct connect_state *state = talloc_get_type(c->private, struct connect_state);
NTSTATUS status;
status = smb_composite_sesssetup_recv(state->creq);
@@ -151,7 +151,7 @@ static NTSTATUS connect_session_setup(struct smbcli_composite *c,
static NTSTATUS connect_negprot(struct smbcli_composite *c,
struct smb_composite_connect *io)
{
- struct connect_state *state = c->private;
+ struct connect_state *state = talloc_get_type(c->private, struct connect_state);
NTSTATUS status;
status = smb_raw_negotiate_recv(state->req);
@@ -191,7 +191,7 @@ static NTSTATUS connect_negprot(struct smbcli_composite *c,
static NTSTATUS connect_session_request(struct smbcli_composite *c,
struct smb_composite_connect *io)
{
- struct connect_state *state = c->private;
+ struct connect_state *state = talloc_get_type(c->private, struct connect_state);
NTSTATUS status;
status = smbcli_transport_connect_recv(state->req);
@@ -207,7 +207,7 @@ static NTSTATUS connect_session_request(struct smbcli_composite *c,
static NTSTATUS connect_socket(struct smbcli_composite *c,
struct smb_composite_connect *io)
{
- struct connect_state *state = c->private;
+ struct connect_state *state = talloc_get_type(c->private, struct connect_state);
NTSTATUS status;
struct nmb_name calling, called;
@@ -245,7 +245,7 @@ static NTSTATUS connect_socket(struct smbcli_composite *c,
*/
static void state_handler(struct smbcli_composite *c)
{
- struct connect_state *state = c->private;
+ struct connect_state *state = talloc_get_type(c->private, struct connect_state);
switch (c->stage) {
case CONNECT_SOCKET:
@@ -338,7 +338,7 @@ NTSTATUS smb_composite_connect_recv(struct smbcli_composite *c, TALLOC_CTX *mem_
status = smb_composite_wait(c);
if (NT_STATUS_IS_OK(status)) {
- struct connect_state *state = c->private;
+ struct connect_state *state = talloc_get_type(c->private, struct connect_state);
talloc_steal(mem_ctx, state->io->out.tree);
}
diff --git a/source4/libcli/composite/loadfile.c b/source4/libcli/composite/loadfile.c
index 2d38096c88..8290876224 100644
--- a/source4/libcli/composite/loadfile.c
+++ b/source4/libcli/composite/loadfile.c
@@ -45,7 +45,7 @@ struct loadfile_state {
static NTSTATUS setup_close(struct smbcli_composite *c,
struct smbcli_tree *tree, uint16_t fnum)
{
- struct loadfile_state *state = c->private;
+ struct loadfile_state *state = talloc_get_type(c->private, struct loadfile_state);
union smb_close *io_close;
/* nothing to read, setup the close */
@@ -74,7 +74,7 @@ static NTSTATUS setup_close(struct smbcli_composite *c,
static NTSTATUS loadfile_open(struct smbcli_composite *c,
struct smb_composite_loadfile *io)
{
- struct loadfile_state *state = c->private;
+ struct loadfile_state *state = talloc_get_type(c->private, struct loadfile_state);
struct smbcli_tree *tree = state->req->tree;
NTSTATUS status;
@@ -128,7 +128,7 @@ static NTSTATUS loadfile_open(struct smbcli_composite *c,
static NTSTATUS loadfile_read(struct smbcli_composite *c,
struct smb_composite_loadfile *io)
{
- struct loadfile_state *state = c->private;
+ struct loadfile_state *state = talloc_get_type(c->private, struct loadfile_state);
struct smbcli_tree *tree = state->req->tree;
NTSTATUS status;
@@ -162,7 +162,7 @@ static NTSTATUS loadfile_read(struct smbcli_composite *c,
static NTSTATUS loadfile_close(struct smbcli_composite *c,
struct smb_composite_loadfile *io)
{
- struct loadfile_state *state = c->private;
+ struct loadfile_state *state = talloc_get_type(c->private, struct loadfile_state);
NTSTATUS status;
status = smbcli_request_simple_recv(state->req);
@@ -183,7 +183,7 @@ static NTSTATUS loadfile_close(struct smbcli_composite *c,
static void loadfile_handler(struct smbcli_request *req)
{
struct smbcli_composite *c = req->async.private;
- struct loadfile_state *state = c->private;
+ struct loadfile_state *state = talloc_get_type(c->private, struct loadfile_state);
/* when this handler is called, the stage indicates what
call has just finished */
@@ -271,7 +271,7 @@ NTSTATUS smb_composite_loadfile_recv(struct smbcli_composite *c, TALLOC_CTX *mem
status = smb_composite_wait(c);
if (NT_STATUS_IS_OK(status)) {
- struct loadfile_state *state = c->private;
+ struct loadfile_state *state = talloc_get_type(c->private, struct loadfile_state);
talloc_steal(mem_ctx, state->io->out.data);
}
diff --git a/source4/libcli/composite/savefile.c b/source4/libcli/composite/savefile.c
index f516939c2b..06eb13bb01 100644
--- a/source4/libcli/composite/savefile.c
+++ b/source4/libcli/composite/savefile.c
@@ -47,7 +47,7 @@ struct savefile_state {
static NTSTATUS setup_close(struct smbcli_composite *c,
struct smbcli_tree *tree, uint16_t fnum)
{
- struct savefile_state *state = c->private;
+ struct savefile_state *state = talloc_get_type(c->private, struct savefile_state);
union smb_close *io_close;
/* nothing to write, setup the close */
@@ -76,7 +76,7 @@ static NTSTATUS setup_close(struct smbcli_composite *c,
static NTSTATUS savefile_open(struct smbcli_composite *c,
struct smb_composite_savefile *io)
{
- struct savefile_state *state = c->private;
+ struct savefile_state *state = talloc_get_type(c->private, struct savefile_state);
union smb_write *io_write;
struct smbcli_tree *tree = state->req->tree;
NTSTATUS status;
@@ -122,7 +122,7 @@ static NTSTATUS savefile_open(struct smbcli_composite *c,
static NTSTATUS savefile_write(struct smbcli_composite *c,
struct smb_composite_savefile *io)
{
- struct savefile_state *state = c->private;
+ struct savefile_state *state = talloc_get_type(c->private, struct savefile_state);
struct smbcli_tree *tree = state->req->tree;
NTSTATUS status;
uint32_t max_xmit = tree->session->transport->negotiate.max_xmit;
@@ -160,7 +160,7 @@ static NTSTATUS savefile_write(struct smbcli_composite *c,
static NTSTATUS savefile_close(struct smbcli_composite *c,
struct smb_composite_savefile *io)
{
- struct savefile_state *state = c->private;
+ struct savefile_state *state = talloc_get_type(c->private, struct savefile_state);
NTSTATUS status;
status = smbcli_request_simple_recv(state->req);
@@ -185,7 +185,7 @@ static NTSTATUS savefile_close(struct smbcli_composite *c,
static void savefile_handler(struct smbcli_request *req)
{
struct smbcli_composite *c = req->async.private;
- struct savefile_state *state = c->private;
+ struct savefile_state *state = talloc_get_type(c->private, struct savefile_state);
/* when this handler is called, the stage indicates what
call has just finished */
diff --git a/source4/libcli/composite/sesssetup.c b/source4/libcli/composite/sesssetup.c
index fdc638837c..771f85e541 100644
--- a/source4/libcli/composite/sesssetup.c
+++ b/source4/libcli/composite/sesssetup.c
@@ -94,7 +94,7 @@ static void use_nt1_session_keys(struct smbcli_session *session,
static void request_handler(struct smbcli_request *req)
{
struct smbcli_composite *c = req->async.private;
- struct sesssetup_state *state = c->private;
+ struct sesssetup_state *state = talloc_get_type(c->private, struct sesssetup_state);
struct smbcli_session *session = req->session;
DATA_BLOB session_key = data_blob(NULL, 0);
DATA_BLOB null_data_blob = data_blob(NULL, 0);
@@ -168,7 +168,7 @@ static struct smbcli_request *session_setup_nt1(struct smbcli_composite *c,
struct smbcli_session *session,
struct smb_composite_sesssetup *io)
{
- struct sesssetup_state *state = c->private;
+ struct sesssetup_state *state = talloc_get_type(c->private, struct sesssetup_state);
state->setup.nt1.level = RAW_SESSSETUP_NT1;
state->setup.nt1.in.bufsize = session->transport->options.max_xmit;
@@ -207,7 +207,7 @@ static struct smbcli_request *session_setup_old(struct smbcli_composite *c,
struct smbcli_session *session,
struct smb_composite_sesssetup *io)
{
- struct sesssetup_state *state = c->private;
+ struct sesssetup_state *state = talloc_get_type(c->private, struct sesssetup_state);
state->setup.old.level = RAW_SESSSETUP_OLD;
state->setup.old.in.bufsize = session->transport->options.max_xmit;
@@ -241,7 +241,7 @@ static struct smbcli_request *session_setup_spnego(struct smbcli_composite *c,
struct smbcli_session *session,
struct smb_composite_sesssetup *io)
{
- struct sesssetup_state *state = c->private;
+ struct sesssetup_state *state = talloc_get_type(c->private, struct sesssetup_state);
NTSTATUS status;
DATA_BLOB session_key = data_blob(NULL, 0);
DATA_BLOB null_data_blob = data_blob(NULL, 0);