summaryrefslogtreecommitdiffstats
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2014-02-12 12:11:51 +0100
committerGünther Deschner <gd@samba.org>2014-02-13 11:54:13 +0100
commit05193b39deeb4ace801a28ed8a1b6f2d51594b78 (patch)
tree510e5876123d36c6024a0c120d194c83969ee53b /source4
parent1228a935ac35c73c53bdf8fbd33ed9c748300079 (diff)
downloadsamba-05193b39deeb4ace801a28ed8a1b6f2d51594b78.tar.gz
samba-05193b39deeb4ace801a28ed8a1b6f2d51594b78.tar.xz
samba-05193b39deeb4ace801a28ed8a1b6f2d51594b78.zip
s4:torture/rpc: use dcerpc_binding_dup() before modifying the given binding
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/rpc/backupkey.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source4/torture/rpc/backupkey.c b/source4/torture/rpc/backupkey.c
index 89257fc977c..1c8f07f0936 100644
--- a/source4/torture/rpc/backupkey.c
+++ b/source4/torture/rpc/backupkey.c
@@ -493,7 +493,7 @@ static DATA_BLOB *encrypt_blob_pk(struct torture_context *tctx,
static struct bkrp_BackupKey *createRetreiveBackupKeyGUIDStruct(struct torture_context *tctx,
struct dcerpc_pipe *p, int version, DATA_BLOB *out)
{
- struct dcerpc_binding *binding = p->binding;
+ struct dcerpc_binding *binding;
struct bkrp_client_side_wrapped data;
struct GUID *g = talloc(tctx, struct GUID);
struct bkrp_BackupKey *r = talloc_zero(tctx, struct bkrp_BackupKey);
@@ -505,7 +505,13 @@ static struct bkrp_BackupKey *createRetreiveBackupKeyGUIDStruct(struct torture_c
return NULL;
}
+ binding = dcerpc_binding_dup(tctx, p->binding);
+ if (binding == NULL) {
+ return NULL;
+ }
+
binding->flags = binding->flags & (DCERPC_SEAL|DCERPC_AUTH_SPNEGO);
+
ZERO_STRUCT(data);
status = GUID_from_string(BACKUPKEY_RETRIEVE_BACKUP_KEY_GUID, g);
if (!NT_STATUS_IS_OK(status)) {