1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-03 01:18:10 +03:00

s4:torture/rpc: make use of dcerpc_binding_handle_get_transport()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Stefan Metzmacher 2024-09-17 22:41:16 +02:00 committed by Ralph Boehme
parent 1713ad96a4
commit 382ece6606
5 changed files with 14 additions and 12 deletions

View File

@ -1145,7 +1145,8 @@ bool test_many_LookupSids(struct dcerpc_pipe *p,
struct lsa_SidArray sids;
int i;
struct dcerpc_binding_handle *b = p->binding_handle;
enum dcerpc_transport_t transport = dcerpc_binding_get_transport(p->binding);
enum dcerpc_transport_t transport =
dcerpc_binding_handle_get_transport(b);
torture_comment(tctx, "\nTesting LookupSids with lots of SIDs\n");
@ -5313,7 +5314,7 @@ bool torture_rpc_lsa(struct torture_context *tctx)
torture_assert_ntstatus_ok(tctx, status, "Error connecting to server");
b = p->binding_handle;
transport = dcerpc_binding_get_transport(p->binding);
transport = dcerpc_binding_handle_get_transport(b);
/* Test lsaLookupSids3 and lsaLookupNames4 over tcpip */
if (transport == NCACN_IP_TCP) {
@ -5413,7 +5414,7 @@ bool torture_rpc_lsa_get_user(struct torture_context *tctx)
torture_assert_ntstatus_ok(tctx, status, "Error connecting to server");
b = p->binding_handle;
transport = dcerpc_binding_get_transport(p->binding);
transport = dcerpc_binding_handle_get_transport(b);
if (transport == NCACN_IP_TCP) {
if (!test_GetUserName_fail(b, tctx)) {
@ -5437,7 +5438,7 @@ static bool testcase_LookupNames(struct torture_context *tctx,
struct lsa_TransNameArray tnames;
struct lsa_TransNameArray2 tnames2;
struct dcerpc_binding_handle *b = p->binding_handle;
enum dcerpc_transport_t transport = dcerpc_binding_get_transport(p->binding);
enum dcerpc_transport_t transport = dcerpc_binding_handle_get_transport(b);
if (transport != NCACN_NP && transport != NCALRPC) {
torture_comment(tctx, "testcase_LookupNames is only available "
@ -5528,7 +5529,7 @@ static bool testcase_TrustedDomains(struct torture_context *tctx,
struct lsa_trustdom_state *state =
talloc_get_type_abort(data, struct lsa_trustdom_state);
struct dcerpc_binding_handle *b = p->binding_handle;
enum dcerpc_transport_t transport = dcerpc_binding_get_transport(p->binding);
enum dcerpc_transport_t transport = dcerpc_binding_handle_get_transport(b);
if (transport != NCACN_NP && transport != NCALRPC) {
torture_comment(tctx, "testcase_TrustedDomains is only available "
@ -5603,7 +5604,7 @@ static bool testcase_Privileges(struct torture_context *tctx,
{
struct policy_handle *handle;
struct dcerpc_binding_handle *b = p->binding_handle;
enum dcerpc_transport_t transport = dcerpc_binding_get_transport(p->binding);
enum dcerpc_transport_t transport = dcerpc_binding_handle_get_transport(b);
if (transport != NCACN_NP && transport != NCALRPC) {
torture_skip(tctx, "testcase_Privileges is only available "

View File

@ -228,7 +228,7 @@ bool torture_rpc_lsa_lookup(struct torture_context *torture)
torture_fail(torture, "unable to connect to table");
}
b = p->binding_handle;
transport = dcerpc_binding_get_transport(p->binding);
transport = dcerpc_binding_handle_get_transport(b);
if (transport != NCACN_NP && transport != NCALRPC) {
torture_comment(torture,
@ -344,7 +344,8 @@ static bool test_LookupSidsReply(struct torture_context *tctx,
const char *dom_sid = "S-1-5-21-1111111111-2222222222-3333333333";
const char *dom_admin_sid;
struct dcerpc_binding_handle *b = p->binding_handle;
enum dcerpc_transport_t transport = dcerpc_binding_get_transport(p->binding);
enum dcerpc_transport_t transport =
dcerpc_binding_handle_get_transport(b);
ZERO_STRUCT(r);
ZERO_STRUCT(sidarray);

View File

@ -5729,7 +5729,7 @@ static bool test_ManyGetDCName(struct torture_context *tctx,
int i;
if (p->conn->transport.transport != NCACN_NP) {
if (dcerpc_binding_handle_get_transport(b) != NCACN_NP) {
torture_skip(tctx, "test_ManyGetDCName works only with NCACN_NP");
}
@ -5821,7 +5821,7 @@ static bool test_lsa_over_netlogon(struct torture_context *tctx,
struct dcerpc_binding_handle *b2;
if (p->conn->transport.transport != NCACN_NP) {
if (dcerpc_binding_handle_get_transport(p->binding_handle) != NCACN_NP) {
torture_skip(tctx, "test_lsa_over_netlogon works only with NCACN_NP");
}

View File

@ -9035,7 +9035,7 @@ static bool test_samr_ValidatePassword(struct torture_context *tctx,
torture_comment(tctx, "Testing samr_ValidatePassword\n");
if (p->conn->transport.transport != NCACN_IP_TCP) {
if (dcerpc_binding_handle_get_transport(b) != NCACN_IP_TCP) {
torture_comment(tctx, "samr_ValidatePassword only should succeed over NCACN_IP_TCP!\n");
}

View File

@ -6503,7 +6503,7 @@ static bool test_SecondaryClosePrinter(struct torture_context *tctx,
struct spoolss_ClosePrinter cp;
/* only makes sense on SMB */
if (p->conn->transport.transport != NCACN_NP) {
if (dcerpc_binding_handle_get_transport(p->binding_handle) != NCACN_NP) {
return true;
}