summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-01-12 09:33:49 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:50:55 -0500
commita5a79e8b8cbdf24d5c2db45ece4110ed5d85e58f (patch)
tree71b27ab4d11e2fc537b0ccf5d4e9c75dcc9757eb /source4/torture/rpc
parent4c6b9c79ff5d35e1d03ad5eb543db4b6b906b5ce (diff)
downloadsamba-a5a79e8b8cbdf24d5c2db45ece4110ed5d85e58f.tar.gz
samba-a5a79e8b8cbdf24d5c2db45ece4110ed5d85e58f.tar.bz2
samba-a5a79e8b8cbdf24d5c2db45ece4110ed5d85e58f.zip
r12865: Upgrade the librpc and libnet code.
In librpc, always try SMB level authentication, even if trying schannel, but allow fallback to anonymous. This should better function with servers that set restrict anonymous. There are too many parts of Samba that get, parse and modify the binding parameters. Avoid the extra work, and add a binding element to the struct dcerpc_pipe The libnet vampire code has been refactored, to reduce extra layers and to better conform with the standard argument pattern. Also, take advantage of the new libnet_Lookup code, so we don't require the silly 'password server' smb.conf parameter. To better support forcing traffic to be sealed for the vampire operation, the dcerpc_bind_auth() function now takes an auth level parameter. Andrew Bartlett (This used to be commit d65b354959842326fdd4bd7eb7fbeea0390f4afa)
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/netlogon.c9
-rw-r--r--source4/torture/rpc/samlogon.c2
-rw-r--r--source4/torture/rpc/schannel.c2
3 files changed, 5 insertions, 8 deletions
diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c
index ab12362759..6dc3158a9f 100644
--- a/source4/torture/rpc/netlogon.c
+++ b/source4/torture/rpc/netlogon.c
@@ -1404,7 +1404,6 @@ static BOOL test_GetDomainInfo_async(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
static BOOL test_ManyGetDCName(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
{
NTSTATUS status;
- struct dcerpc_binding *b;
struct dcerpc_pipe *p2;
struct lsa_ObjectAttribute attr;
struct lsa_QosInfo qos;
@@ -1425,13 +1424,7 @@ static BOOL test_ManyGetDCName(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
printf("Torturing GetDCName\n");
- status = dcerpc_parse_binding(mem_ctx, p->conn->binding_string, &b);
- if (!NT_STATUS_IS_OK(status)) {
- printf("Failed to parse dcerpc binding '%s'\n", p->conn->binding_string);
- return False;
- }
-
- status = dcerpc_secondary_connection(p, &p2, b);
+ status = dcerpc_secondary_connection(p, &p2, p->binding);
if (!NT_STATUS_IS_OK(status)) {
printf("Failed to create secondary connection\n");
return False;
diff --git a/source4/torture/rpc/samlogon.c b/source4/torture/rpc/samlogon.c
index 996d78d25f..af29d44347 100644
--- a/source4/torture/rpc/samlogon.c
+++ b/source4/torture/rpc/samlogon.c
@@ -1742,6 +1742,8 @@ BOOL torture_rpc_samlogon(void)
* session key encryption) */
for (i=0; i < ARRAY_SIZE(credential_flags); i++) {
+ /* TODO: Somehow we lost setting up the different credential flags here! */
+
if (!test_InteractiveLogon(p, mem_ctx, creds,
usercreds[0].comment,
TEST_MACHINE_NAME,
diff --git a/source4/torture/rpc/schannel.c b/source4/torture/rpc/schannel.c
index bab0ffc4e8..eba9affce0 100644
--- a/source4/torture/rpc/schannel.c
+++ b/source4/torture/rpc/schannel.c
@@ -210,6 +210,7 @@ static BOOL test_schannel(TALLOC_CTX *mem_ctx,
status = dcerpc_bind_auth(p_netlogon, &dcerpc_table_netlogon,
credentials, DCERPC_AUTH_TYPE_SCHANNEL,
+ dcerpc_auth_level(p->conn),
NULL);
if (!NT_STATUS_IS_OK(status)) {
@@ -242,6 +243,7 @@ static BOOL test_schannel(TALLOC_CTX *mem_ctx,
status = dcerpc_bind_auth(p_lsa, &dcerpc_table_lsarpc,
credentials, DCERPC_AUTH_TYPE_SCHANNEL,
+ dcerpc_auth_level(p->conn),
NULL);
if (!NT_STATUS_IS_OK(status)) {