bool torture_raw_qfileinfo_pipe(struct torture_context *torture, struct smbcli_state *cli) { bool ret = true; int fnum; const char *fname = "\\lsass"; struct dcerpc_pipe *p; struct smbcli_tree *ipc_tree; NTSTATUS status; if (!(p = dcerpc_pipe_init(torture, cli->tree->session->transport->socket->event.ctx, lp_iconv_convenience(torture->lp_ctx)))) { return false; } status = dcerpc_pipe_open_smb(p, cli->tree, fname); torture_assert_ntstatus_ok(torture, status, "dcerpc_pipe_open_smb failed"); ipc_tree = dcerpc_smb_tree(p->conn); fnum = dcerpc_smb_fnum(p->conn); ret = torture_raw_qfileinfo_internals(torture, torture, ipc_tree, fnum, fname, true /* is_ipc */); talloc_free(p); return ret; }
BOOL torture_raw_qfileinfo_pipe(struct torture_context *torture) { TALLOC_CTX *mem_ctx; BOOL ret = True; int fnum; const char *fname = "\\lsass"; struct smbcli_state *cli; struct dcerpc_pipe *p; struct smbcli_tree *ipc_tree; NTSTATUS status; if (!torture_open_connection(&cli, 0)) { return False; } mem_ctx = talloc_init("torture_qfileinfo_pipe"); if (!(p = dcerpc_pipe_init(mem_ctx, cli->tree->session->transport->socket->event.ctx))) { return False; } status = dcerpc_pipe_open_smb(p, cli->tree, fname); if (!NT_STATUS_IS_OK(status)) { d_printf("dcerpc_pipe_open_smb failed: %s\n", nt_errstr(status)); talloc_free(p); return False; } ipc_tree = dcerpc_smb_tree(p->conn); fnum = dcerpc_smb_fnum(p->conn); ret = torture_raw_qfileinfo_internals(torture, mem_ctx, ipc_tree, fnum, fname, True /* is_ipc */); talloc_free(p); return ret; }