+ nt_status = dcerpc_parse_binding(frame, server, &binding);
+
+ if (!NT_STATUS_IS_OK(nt_status)) {
+
+ binding_string = talloc_asprintf(frame, "ncacn_np:%s",
+ strip_hostname(server));
+ if (!binding_string) {
+ result = 1;
+ goto done;
+ }
+
+ nt_status = dcerpc_parse_binding(frame, binding_string, &binding);
+ if (!NT_STATUS_IS_OK(nt_status)) {
+ result = -1;
+ goto done;
+ }
+ }
+
+ if (binding->transport == NCA_UNKNOWN) {
+ 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;
+ }
+