summaryrefslogtreecommitdiff
path: root/source4/torture/rpc/samsync.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2013-08-02 10:08:54 +0200
committerStefan Metzmacher <metze@samba.org>2013-08-10 09:18:59 +0200
commit2ea3a24dced0814100e352bbbca124011be73602 (patch)
tree8a1c34c43a72d296d20676b36bc0854489377683 /source4/torture/rpc/samsync.c
parentc0144273af8f0956a05d102113c40cec77069f7a (diff)
downloadsamba-2ea3a24dced0814100e352bbbca124011be73602.tar.gz
samba-2ea3a24dced0814100e352bbbca124011be73602.tar.bz2
samba-2ea3a24dced0814100e352bbbca124011be73602.zip
s4:torture: avoid usage of dcerpc_schannel_creds()
We use cli_credentials_get_netlogon_creds() which returns the same value. dcerpc_schannel_creds() is a layer violation. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/torture/rpc/samsync.c')
-rw-r--r--source4/torture/rpc/samsync.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/source4/torture/rpc/samsync.c b/source4/torture/rpc/samsync.c
index 81027d0658..15cab73f3d 100644
--- a/source4/torture/rpc/samsync.c
+++ b/source4/torture/rpc/samsync.c
@@ -27,7 +27,6 @@
#include "system/time.h"
#include "torture/rpc/torture_rpc.h"
#include "auth/gensec/gensec.h"
-#include "auth/gensec/schannel.h"
#include "libcli/auth/libcli_auth.h"
#include "libcli/samsync/samsync.h"
#include "libcli/security/security.h"
@@ -1720,9 +1719,8 @@ bool torture_rpc_samsync(struct torture_context *torture)
}
samsync_state->b = samsync_state->p->binding_handle;
- status = dcerpc_schannel_creds(samsync_state->p->conn->security_state.generic_state,
- samsync_state, &samsync_state->creds);
- if (!NT_STATUS_IS_OK(status)) {
+ samsync_state->creds = cli_credentials_get_netlogon_creds(credentials);
+ if (samsync_state->creds == NULL) {
ret = false;
}
@@ -1758,9 +1756,8 @@ bool torture_rpc_samsync(struct torture_context *torture)
goto failed;
}
- status = dcerpc_schannel_creds(samsync_state->p_netlogon_wksta->conn->security_state.generic_state,
- samsync_state, &samsync_state->creds_netlogon_wksta);
- if (!NT_STATUS_IS_OK(status)) {
+ samsync_state->creds_netlogon_wksta = cli_credentials_get_netlogon_creds(credentials_wksta);
+ if (samsync_state->creds_netlogon_wksta == NULL) {
torture_comment(torture, "Failed to obtail schanel creds!\n");
ret = false;
}