#include "libcli/auth/libcli_auth.h"
#include "lib/crypto/crypto.h"
#include "libcli/security/proto.h"
+#include "param/param.h"
static struct cli_credentials *create_anon_creds(TALLOC_CTX *mem_ctx)
{
return NULL;
}
- cli_credentials_set_conf(result);
+ cli_credentials_set_conf(result, global_loadparm);
cli_credentials_set_anonymous(result);
return result;
goto done;
}
- status = dcerpc_bind_auth_none(lsa_pipe, &dcerpc_table_lsarpc);
+ status = dcerpc_bind_auth_none(lsa_pipe, &ndr_table_lsarpc);
if (!NT_STATUS_IS_OK(status)) {
d_printf("dcerpc_bind_auth_none failed: %s\n",
nt_errstr(status));
goto done;
}
- status = dcerpc_bind_auth(lsa_pipe, &dcerpc_table_lsarpc,
+ status = dcerpc_bind_auth(lsa_pipe, &ndr_table_lsarpc,
credentials, auth_type, auth_level,
NULL);
if (!NT_STATUS_IS_OK(status)) {
}
if (admin_creds != NULL) {
- status = dcerpc_bind_auth(samr_pipe, &dcerpc_table_samr,
+ status = dcerpc_bind_auth(samr_pipe, &ndr_table_samr,
admin_creds, auth_type, auth_level,
NULL);
if (!NT_STATUS_IS_OK(status)) {
}
} else {
/* We must have an authenticated SMB connection */
- status = dcerpc_bind_auth_none(samr_pipe, &dcerpc_table_samr);
+ status = dcerpc_bind_auth_none(samr_pipe, &ndr_table_samr);
if (!NT_STATUS_IS_OK(status)) {
d_printf("dcerpc_bind_auth_none failed: %s\n",
nt_errstr(status));
goto done;
}
- status = dcerpc_bind_auth_none(net_pipe, &dcerpc_table_netlogon);
+ status = dcerpc_bind_auth_none(net_pipe, &ndr_table_netlogon);
if (!NT_STATUS_IS_OK(status)) {
d_printf("dcerpc_bind_auth_none failed: %s\n",
nt_errstr(status));
#endif
#if 1
net_pipe->conn->flags |= (DCERPC_SIGN | DCERPC_SEAL);
- status = dcerpc_bind_auth(net_pipe, &dcerpc_table_netlogon,
+ status = dcerpc_bind_auth(net_pipe, &ndr_table_netlogon,
wks_creds, DCERPC_AUTH_TYPE_SCHANNEL,
DCERPC_AUTH_LEVEL_PRIVACY,
NULL);
#else
- status = dcerpc_bind_auth_none(net_pipe, &dcerpc_table_netlogon);
+ status = dcerpc_bind_auth_none(net_pipe, &ndr_table_netlogon);
#endif
if (!NT_STATUS_IS_OK(status)) {
d_printf("schannel bind failed: %s\n", nt_errstr(status));
goto done;
}
- cli_credentials_set_conf(wks_creds);
+ cli_credentials_set_conf(wks_creds, global_loadparm);
cli_credentials_set_secure_channel_type(wks_creds, SEC_CHAN_WKSTA);
cli_credentials_set_username(wks_creds, wks_name, CRED_SPECIFIED);
cli_credentials_set_workstation(wks_creds, wks_name, CRED_SPECIFIED);
struct cli_credentials *wks_creds;
status = smbcli_full_connection(mem_ctx, &cli,
- lp_parm_string(-1, "torture", "host"),
+ lp_parm_string(NULL, "torture", "host"),
"IPC$", NULL, smb_creds, NULL);
if (!NT_STATUS_IS_OK(status)) {
d_printf("smbcli_full_connection failed: %s\n",
goto done;
}
- cli_credentials_set_conf(wks_creds);
+ cli_credentials_set_conf(wks_creds, global_loadparm);
cli_credentials_set_secure_channel_type(wks_creds, SEC_CHAN_WKSTA);
cli_credentials_set_username(wks_creds, wks_name, CRED_SPECIFIED);
cli_credentials_set_workstation(wks_creds, wks_name, CRED_SPECIFIED);
struct dom_sid *result;
status = pipe_bind_smb(mem_ctx, tree, "\\pipe\\lsarpc",
- &dcerpc_table_lsarpc, &lsa);
+ &ndr_table_lsarpc, &lsa);
if (!NT_STATUS_IS_OK(status)) {
d_printf("(%s) Could not bind to LSA: %s\n",
__location__, nt_errstr(status));
goto done;
}
- cli_credentials_set_conf(user_creds);
+ cli_credentials_set_conf(user_creds, global_loadparm);
cli_credentials_set_username(user_creds, "torture_username",
CRED_SPECIFIED);
cli_credentials_set_password(user_creds,
}
status = pipe_bind_smb(mem_ctx, cli->tree, "\\pipe\\srvsvc",
- &dcerpc_table_srvsvc, &p);
+ &ndr_table_srvsvc, &p);
if (!NT_STATUS_IS_OK(status)) {
d_printf("(%s) could not bind to srvsvc pipe: %s\n",
__location__, nt_errstr(status));
}
status = pipe_bind_smb(mem_ctx, tree, "\\pipe\\srvsvc",
- &dcerpc_table_srvsvc, &p);
+ &ndr_table_srvsvc, &p);
if (!NT_STATUS_IS_OK(status)) {
d_printf("(%s) could not bind to srvsvc pipe: %s\n",
__location__, nt_errstr(status));
}
status = pipe_bind_smb(mem_ctx, tree, "\\pipe\\srvsvc",
- &dcerpc_table_srvsvc, &p);
+ &ndr_table_srvsvc, &p);
if (!NT_STATUS_IS_OK(status)) {
d_printf("(%s) could not bind to srvsvc pipe: %s\n",
__location__, nt_errstr(status));
}
status = pipe_bind_smb(mem_ctx, cli->tree, "\\lsarpc",
- &dcerpc_table_lsarpc, &p);
+ &ndr_table_lsarpc, &p);
if (!NT_STATUS_IS_OK(status)) {
d_printf("(%s) pipe_bind_smb failed: %s\n", __location__,
nt_errstr(status));
return NT_STATUS_NO_MEMORY;
}
- status = pipe_bind_smb(mem_ctx, tree, "\\srvsvc", &dcerpc_table_srvsvc,
+ status = pipe_bind_smb(mem_ctx, tree, "\\srvsvc", &ndr_table_srvsvc,
&p);
if (!NT_STATUS_IS_OK(status)) {
d_printf("could not bind to srvsvc pipe\n");
}
status = pipe_bind_smb(mem_ctx, cli->tree, "\\spoolss",
- &dcerpc_table_spoolss, &p);
+ &ndr_table_spoolss, &p);
if (!NT_STATUS_IS_OK(status)) {
d_printf("(%s) pipe_bind_smb failed: %s\n", __location__,
nt_errstr(status));
ZERO_STRUCT(userlevel1);
userlevel1.client = talloc_asprintf(
- mem_ctx, "\\\\%s", lp_netbios_name());
+ mem_ctx, "\\\\%s", lp_netbios_name(global_loadparm));
userlevel1.user = cli_credentials_get_username(cmdline_credentials);
userlevel1.build = 2600;
userlevel1.major = 3;
}
status = pipe_bind_smb(mem_ctx, cli->tree, "\\wkssvc",
- &dcerpc_table_wkssvc, &p);
+ &ndr_table_wkssvc, &p);
if (!NT_STATUS_IS_OK(status)) {
d_printf("(%s) pipe_bind_smb failed: %s\n", __location__,
nt_errstr(status));
mem_ctx = talloc_init("torture_rpc_winreg");
- status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_winreg);
+ status = torture_rpc_connection(torture, &p, &ndr_table_winreg);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(mem_ctx);