status = libnet_RpcConnect(ctx, ctx, &connect);
if (!NT_STATUS_EQUAL(status, expected_status)) {
- printf("Connecting to rpc service %s on %s.\n\tFAILED. Expected: %s."
+ d_printf("Connecting to rpc service %s on %s.\n\tFAILED. Expected: %s."
"Received: %s\n",
connect.in.dcerpc_iface->name, connect.in.binding, nt_errstr(expected_status),
nt_errstr(status));
return False;
}
- printf("PASSED. Expected: %s, received: %s\n", nt_errstr(expected_status),
+ d_printf("PASSED. Expected: %s, received: %s\n", nt_errstr(expected_status),
nt_errstr(status));
if (connect.level == LIBNET_RPC_CONNECT_DC_INFO && NT_STATUS_IS_OK(status)) {
- printf("Domain Controller Info:\n");
- printf("\tDomain Name:\t %s\n", connect.out.domain_name);
- printf("\tDomain SID:\t %s\n", dom_sid_string(ctx, connect.out.domain_sid));
- printf("\tRealm:\t\t %s\n", connect.out.realm);
- printf("\tGUID:\t\t %s\n", GUID_string(ctx, connect.out.guid));
+ d_printf("Domain Controller Info:\n");
+ d_printf("\tDomain Name:\t %s\n", connect.out.domain_name);
+ d_printf("\tDomain SID:\t %s\n", dom_sid_string(ctx, connect.out.domain_sid));
+ d_printf("\tRealm:\t\t %s\n", connect.out.realm);
+ d_printf("\tGUID:\t\t %s\n", GUID_string(ctx, connect.out.guid));
} else if (!NT_STATUS_IS_OK(status)) {
- printf("Error string: %s\n", connect.out.error_string);
+ d_printf("Error string: %s\n", connect.out.error_string);
}
return True;
ctx = libnet_context_init(NULL);
ctx->cred = cmdline_credentials;
- printf("Testing connection to LSA interface\n");
+ d_printf("Testing connection to LSA interface\n");
if (!test_connect_service(ctx, &dcerpc_table_lsarpc, bindstr,
hostname, level, False, NT_STATUS_OK)) {
- printf("failed to connect LSA interface\n");
+ d_printf("failed to connect LSA interface\n");
return False;
}
- printf("Testing connection to SAMR interface\n");
+ d_printf("Testing connection to SAMR interface\n");
if (!test_connect_service(ctx, &dcerpc_table_samr, bindstr,
hostname, level, False, NT_STATUS_OK)) {
- printf("failed to connect SAMR interface\n");
+ d_printf("failed to connect SAMR interface\n");
return False;
}
- printf("Testing connection to SRVSVC interface\n");
+ d_printf("Testing connection to SRVSVC interface\n");
if (!test_connect_service(ctx, &dcerpc_table_srvsvc, bindstr,
hostname, level, False, NT_STATUS_OK)) {
- printf("failed to connect SRVSVC interface\n");
+ d_printf("failed to connect SRVSVC interface\n");
return False;
}
- printf("Testing connection to LSA interface with wrong credentials\n");
+ d_printf("Testing connection to LSA interface with wrong credentials\n");
if (!test_connect_service(ctx, &dcerpc_table_lsarpc, bindstr,
hostname, level, True, NT_STATUS_LOGON_FAILURE)) {
- printf("failed to test wrong credentials on LSA interface\n");
+ d_printf("failed to test wrong credentials on LSA interface\n");
return False;
}
- printf("Testing connection to SAMR interface with wrong credentials\n");
+ d_printf("Testing connection to SAMR interface with wrong credentials\n");
if (!test_connect_service(ctx, &dcerpc_table_samr, bindstr,
hostname, level, True, NT_STATUS_LOGON_FAILURE)) {
- printf("failed to test wrong credentials on SAMR interface\n");
+ d_printf("failed to test wrong credentials on SAMR interface\n");
return False;
}
bindstr = lp_parm_string(-1, "torture", "binding");
status = dcerpc_parse_binding(torture, bindstr, &binding);
if (!NT_STATUS_IS_OK(status)) {
- printf("failed to parse binding string\n");
+ d_printf("failed to parse binding string\n");
return False;
}
bindstr = lp_parm_string(-1, "torture", "binding");
status = dcerpc_parse_binding(torture, bindstr, &binding);
if (!NT_STATUS_IS_OK(status)) {
- printf("failed to parse binding string\n");
+ d_printf("failed to parse binding string\n");
return False;
}
bindstr = lp_parm_string(-1, "torture", "binding");
status = dcerpc_parse_binding(torture, bindstr, &binding);
if (!NT_STATUS_IS_OK(status)) {
- printf("failed to parse binding string\n");
+ d_printf("failed to parse binding string\n");
return False;
}
bindstr = lp_parm_string(-1, "torture", "binding");
status = dcerpc_parse_binding(torture, bindstr, &binding);
if (!NT_STATUS_IS_OK(status)) {
- printf("failed to parse binding string\n");
+ d_printf("failed to parse binding string\n");
return False;
}
bindstr = lp_parm_string(-1, "torture", "binding");
status = dcerpc_parse_binding(torture, bindstr, &binding);
if (!NT_STATUS_IS_OK(status)) {
- printf("failed to parse binding string\n");
+ d_printf("failed to parse binding string\n");
return False;
}
creds_des_encrypt(creds, &r.in.new_password);
printf("Testing ServerPasswordSet on machine account\n");
- printf("Changing machine account password to '%s'\n", password);
+ d_printf("Changing machine account password to '%s'\n", password);
creds_client_authenticator(creds, &r.in.credential);
allows the password to be set to the same value twice in a
row (match win2k3) */
printf("Testing a second ServerPasswordSet on machine account\n");
- printf("Changing machine account password to '%s' (same as previous run)\n", password);
+ d_printf("Changing machine account password to '%s' (same as previous run)\n", password);
creds_client_authenticator(creds, &r.in.credential);
r.in.new_password.length = IVAL(password_buf.data, 512);
printf("Testing ServerPasswordSet2 on machine account\n");
- printf("Changing machine account password to '%s'\n", password);
+ d_printf("Changing machine account password to '%s'\n", password);
creds_client_authenticator(creds, &r.in.credential);
r.in.new_password.length = IVAL(password_buf.data, 512);
printf("Testing ServerPasswordSet2 on machine account\n");
- printf("Changing machine account password to '%s'\n", password);
+ d_printf("Changing machine account password to '%s'\n", password);
creds_client_authenticator(creds, &r.in.credential);
r.in.new_password.length = IVAL(password_buf.data, 512);
printf("Testing second ServerPasswordSet2 on machine account\n");
- printf("Changing machine account password to '%s'\n", password);
+ d_printf("Changing machine account password to '%s'\n", password);
creds_client_authenticator(creds, &r.in.credential);
allows the password to be set to the same value twice in a
row (match win2k3) */
printf("Testing a second ServerPasswordSet2 on machine account\n");
- printf("Changing machine account password to '%s' (same as previous run)\n", password);
+ d_printf("Changing machine account password to '%s' (same as previous run)\n", password);
creds_client_authenticator(creds, &r.in.credential);
r.in.logon_level = 2;
r.in.logon.network = &ninfo;
- printf("Testing LogonSamLogon with name %s\n", ninfo.identity_info.account_name.string);
+ d_printf("Testing LogonSamLogon with name %s\n", ninfo.identity_info.account_name.string);
for (i=2;i<3;i++) {
ZERO_STRUCT(auth2);