diff options
author | Stefan Metzmacher <metze@samba.org> | 2014-02-04 10:05:29 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2014-02-13 11:54:18 +0100 |
commit | 75927a5e40fb857e91dcc3d960536fe1207014b3 (patch) | |
tree | 1733d56d942012e1d2752d2ad2e4d99dca8d9c86 /source4/torture | |
parent | 26c2a27c2d723c4bace1017a392ba66ec57d5c0e (diff) | |
download | samba-75927a5e40fb857e91dcc3d960536fe1207014b3.tar.gz samba-75927a5e40fb857e91dcc3d960536fe1207014b3.tar.xz samba-75927a5e40fb857e91dcc3d960536fe1207014b3.zip |
s4:torture/rpc: make use of dcerpc_binding_set_flags()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/rpc/backupkey.c | 5 | ||||
-rw-r--r-- | source4/torture/rpc/dsgetinfo.c | 6 | ||||
-rw-r--r-- | source4/torture/rpc/session_key.c | 3 |
3 files changed, 11 insertions, 3 deletions
diff --git a/source4/torture/rpc/backupkey.c b/source4/torture/rpc/backupkey.c index 1c8f07f0936..997f828f24d 100644 --- a/source4/torture/rpc/backupkey.c +++ b/source4/torture/rpc/backupkey.c @@ -510,7 +510,10 @@ static struct bkrp_BackupKey *createRetreiveBackupKeyGUIDStruct(struct torture_c return NULL; } - binding->flags = binding->flags & (DCERPC_SEAL|DCERPC_AUTH_SPNEGO); + status = dcerpc_binding_set_flags(binding, DCERPC_SEAL|DCERPC_AUTH_SPNEGO, 0); + if (!NT_STATUS_IS_OK(status)) { + return NULL; + } ZERO_STRUCT(data); status = GUID_from_string(BACKUPKEY_RETRIEVE_BACKUP_KEY_GUID, g); diff --git a/source4/torture/rpc/dsgetinfo.c b/source4/torture/rpc/dsgetinfo.c index df640e3bcc2..b622f60f92b 100644 --- a/source4/torture/rpc/dsgetinfo.c +++ b/source4/torture/rpc/dsgetinfo.c @@ -127,7 +127,11 @@ static struct DsGetinfoTest *test_create_context(struct torture_context *tctx) printf("Bad binding string %s\n", binding); return NULL; } - ctx->drsuapi_binding->flags |= DCERPC_SIGN | DCERPC_SEAL; + status = dcerpc_binding_set_flags(ctx->drsuapi_binding, DCERPC_SIGN | DCERPC_SEAL, 0); + if (!NT_STATUS_IS_OK(status)) { + printf("dcerpc_binding_set_flags - %s\n", nt_errstr(status)); + return NULL; + } /* ctx->admin ...*/ ctx->admin.credentials = cmdline_credentials; diff --git a/source4/torture/rpc/session_key.c b/source4/torture/rpc/session_key.c index 8e3f1402115..11f6a0b9949 100644 --- a/source4/torture/rpc/session_key.c +++ b/source4/torture/rpc/session_key.c @@ -161,7 +161,8 @@ static bool test_secrets(struct torture_context *torture, const void *_data) torture_assert_ntstatus_ok(torture, torture_rpc_binding(torture, &binding), "Getting bindoptions"); - binding->flags |= settings->bindoptions; + status = dcerpc_binding_set_flags(binding, settings->bindoptions, 0); + torture_assert_ntstatus_ok(torture, status, "dcerpc_binding_set_flags"); status = dcerpc_pipe_connect_b(torture, &p, binding, &ndr_table_lsarpc, |