summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-05-19 13:58:06 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:08:08 -0500
commit5445415b824e983738b41d0f7e42482faa467b40 (patch)
treeb7049246c314db2d524c3ffea369908815ed36bb
parent2adbcc3965339d0fdd20f8dc6ddbe13a620f9935 (diff)
downloadsamba-5445415b824e983738b41d0f7e42482faa467b40.tar.gz
samba-5445415b824e983738b41d0f7e42482faa467b40.tar.bz2
samba-5445415b824e983738b41d0f7e42482faa467b40.zip
r15711: - make use of nttrans_setup_reply()
metze (This used to be commit a870c084f6a97fc4f165510e9d447d97f0ee328f)
-rw-r--r--source4/smb_server/smb/nttrans.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/source4/smb_server/smb/nttrans.c b/source4/smb_server/smb/nttrans.c
index b9da899fa9..d7c600aa52 100644
--- a/source4/smb_server/smb/nttrans.c
+++ b/source4/smb_server/smb/nttrans.c
@@ -68,14 +68,11 @@ static NTSTATUS nttrans_create_send(struct nttrans_op *op)
{
union smb_open *io = talloc_get_type(op->op_info, union smb_open);
uint8_t *params;
+ NTSTATUS status;
- op->trans->out.setup_count = 0;
- op->trans->out.setup = NULL;
- op->trans->out.params = data_blob_talloc(op, NULL, 69);
- op->trans->out.data = data_blob(NULL, 0);
-
+ status = nttrans_setup_reply(op, op->trans, 69, 0, 0);
+ NT_STATUS_NOT_OK_RETURN(status);
params = op->trans->out.params.data;
- NT_STATUS_HAVE_NO_MEMORY(params);
SSVAL(params, 0, io->ntcreatex.out.oplock_level);
SSVAL(params, 2, io->ntcreatex.out.file.fnum);
@@ -197,22 +194,20 @@ static NTSTATUS nttrans_create(struct smbsrv_request *req,
*/
static NTSTATUS nttrans_query_sec_desc_send(struct nttrans_op *op)
{
- struct smb_nttrans *trans = op->trans;
union smb_fileinfo *io = talloc_get_type(op->op_info, union smb_fileinfo);
+ uint8_t *params;
NTSTATUS status;
- trans->out.setup_count = 0;
- trans->out.setup = NULL;
- trans->out.params = data_blob_talloc(op, NULL, 4);
- trans->out.data = data_blob(NULL, 0);
- NT_STATUS_HAVE_NO_MEMORY(trans->out.params.data);
+ status = nttrans_setup_reply(op, op->trans, 4, 0, 0);
+ NT_STATUS_NOT_OK_RETURN(status);
+ params = op->trans->out.params.data;
- status = ndr_push_struct_blob(&trans->out.data, op,
+ status = ndr_push_struct_blob(&op->trans->out.data, op,
io->query_secdesc.out.sd,
(ndr_push_flags_fn_t)ndr_push_security_descriptor);
NT_STATUS_NOT_OK_RETURN(status);
- SIVAL(trans->out.params.data, 0, trans->out.data.length);
+ SIVAL(params, 0, op->trans->out.data.length);
return NT_STATUS_OK;
}