#include "includes.h"
#include "rpcclient.h"
#include "../libcli/auth/libcli_auth.h"
+#include "../librpc/gen_ndr/cli_lsa.h"
+#include "rpc_client/cli_lsarpc.h"
+#include "../librpc/gen_ndr/ndr_netlogon.h"
+#include "rpc_client/cli_netlogon.h"
-DOM_SID domain_sid;
+struct dom_sid domain_sid;
static enum pipe_auth_type pipe_default_auth_type = PIPE_AUTH_TYPE_NONE;
static enum dcerpc_AuthLevel pipe_default_auth_level = DCERPC_AUTH_LEVEL_NONE;
default:
DEBUG(0, ("Could not initialise %s. Invalid "
"auth type %u\n",
- get_pipe_name_from_iface(
+ get_pipe_name_from_syntax(
+ talloc_tos(),
cmd_entry->interface),
pipe_default_auth_type ));
return NT_STATUS_UNSUCCESSFUL;
}
if (!NT_STATUS_IS_OK(ntresult)) {
DEBUG(0, ("Could not initialise %s. Error was %s\n",
- get_pipe_name_from_iface(
- cmd_entry->interface),
+ get_pipe_name_from_syntax(
+ talloc_tos(), cmd_entry->interface),
nt_errstr(ntresult) ));
return ntresult;
}
if (!NT_STATUS_IS_OK(ntresult)) {
DEBUG(0, ("Could not initialise credentials for %s.\n",
- get_pipe_name_from_iface(
+ get_pipe_name_from_syntax(
+ talloc_tos(),
cmd_entry->interface)));
return ntresult;
}
binding->transport = NCACN_NP;
}
+ if (binding->flags & DCERPC_SIGN) {
+ pipe_default_auth_level = DCERPC_AUTH_LEVEL_INTEGRITY;
+ pipe_default_auth_type = PIPE_AUTH_TYPE_NTLMSSP;
+ }
+ if (binding->flags & DCERPC_SEAL) {
+ pipe_default_auth_level = DCERPC_AUTH_LEVEL_PRIVACY;
+ pipe_default_auth_type = PIPE_AUTH_TYPE_NTLMSSP;
+ }
+ if (binding->flags & DCERPC_AUTH_SPNEGO) {
+ pipe_default_auth_type = PIPE_AUTH_TYPE_SPNEGO_NTLMSSP;
+ }
+ if (binding->flags & DCERPC_AUTH_NTLM) {
+ pipe_default_auth_type = PIPE_AUTH_TYPE_NTLMSSP;
+ }
+ if (binding->flags & DCERPC_AUTH_KRB5) {
+ pipe_default_auth_type = PIPE_AUTH_TYPE_SPNEGO_KRB5;
+ }
+
if (get_cmdline_auth_info_use_kerberos(rpcclient_auth_info)) {
flags |= CLI_FULL_CONNECTION_USE_KERBEROS |
CLI_FULL_CONNECTION_FALLBACK_AFTER_KERBEROS;
}
+ if (get_cmdline_auth_info_use_ccache(rpcclient_auth_info)) {
+ flags |= CLI_FULL_CONNECTION_USE_CCACHE;
+ }
user = talloc_strdup(frame, get_cmdline_auth_info_username(rpcclient_auth_info));
SMB_ASSERT(user != NULL);