summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-05-18 01:30:21 +0000
committerJeremy Allison <jra@samba.org>2001-05-18 01:30:21 +0000
commitc912d04389e9bd38ac4e5ef8b29fae1faaf86e7b (patch)
treef1a95790c905505cb6c418c671f75eac8f4698e5
parent013b454d1a2858b6f3b48e7b73f549ec7540d189 (diff)
downloadsamba-c912d04389e9bd38ac4e5ef8b29fae1faaf86e7b.tar.gz
samba-c912d04389e9bd38ac4e5ef8b29fae1faaf86e7b.tar.bz2
samba-c912d04389e9bd38ac4e5ef8b29fae1faaf86e7b.zip
Fix the W2KSP2 joining a Samba domain problem.
Jeremy. (This used to be commit 6bbcab5e48f91a80d4ebcbd2bee38f2e0a8bff78)
-rw-r--r--source3/include/proto.h6
-rw-r--r--source3/rpc_server/srv_pipe.c8
-rw-r--r--source3/rpc_server/srv_pipe_hnd.c4
-rw-r--r--source3/rpc_server/srv_samr.c5
4 files changed, 16 insertions, 7 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 0aaa9a4721..abfd7da64e 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -2334,6 +2334,10 @@ BOOL cli_spoolss_reply_rrpcn(struct cli_state *cli, POLICY_HND *handle,
uint32 change_low, uint32 change_high, uint32 *status);
BOOL cli_spoolss_reply_close_printer(struct cli_state *cli, POLICY_HND *handle, uint32 *status);
+/* The following definitions come from rpc_client/cli_trust.c */
+
+BOOL change_trust_account_password( char *domain, char *remote_machine_list);
+
/* The following definitions come from rpc_client/cli_use.c */
void init_cli_use(void);
@@ -3675,7 +3679,7 @@ uint32 _net_sam_logon(pipes_struct *p, NET_Q_SAM_LOGON *q_u, NET_R_SAM_LOGON *r_
BOOL create_next_pdu(pipes_struct *p);
BOOL api_pipe_bind_auth_resp(pipes_struct *p, prs_struct *rpc_in_p);
-BOOL setup_fault_pdu(pipes_struct *p);
+BOOL setup_fault_pdu(pipes_struct *p, uint32 status);
BOOL check_bind_req(char* pipe_name, RPC_IFACE* abstract,
RPC_IFACE* transfer);
BOOL api_pipe_bind_req(pipes_struct *p, prs_struct *rpc_in_p);
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index 345664a396..5f6a1d479c 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -93,7 +93,7 @@ BOOL create_next_pdu(pipes_struct *p)
*/
if(p->fault_state) {
- setup_fault_pdu(p);
+ setup_fault_pdu(p, 0x1c010002);
return True;
}
@@ -617,7 +617,7 @@ static BOOL setup_bind_nak(pipes_struct *p)
Marshall a fault pdu.
*******************************************************************/
-BOOL setup_fault_pdu(pipes_struct *p)
+BOOL setup_fault_pdu(pipes_struct *p, uint32 status)
{
prs_struct outgoing_pdu;
RPC_HDR fault_hdr;
@@ -649,7 +649,7 @@ BOOL setup_fault_pdu(pipes_struct *p)
memset((char *)&hdr_resp, '\0', sizeof(hdr_resp));
- fault_resp.status = 0x1c010002;
+ fault_resp.status = status;
fault_resp.reserved = 0;
/*
@@ -1195,7 +1195,7 @@ BOOL api_rpcTNP(pipes_struct *p, char *rpc_name,
* and not put the pipe into fault state. JRA.
*/
DEBUG(4, ("unknown\n"));
- setup_fault_pdu(p);
+ setup_fault_pdu(p, 0x1c010002);
return True;
}
diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c
index 893bc8cb88..f91df7c4ef 100644
--- a/source3/rpc_server/srv_pipe_hnd.c
+++ b/source3/rpc_server/srv_pipe_hnd.c
@@ -570,7 +570,7 @@ static ssize_t process_complete_pdu(pipes_struct *p)
DEBUG(10,("process_complete_pdu: pipe %s in fault state.\n",
p->name ));
set_incoming_fault(p);
- setup_fault_pdu(p);
+ setup_fault_pdu(p, 0x1c010002);
return (ssize_t)data_len;
}
@@ -619,7 +619,7 @@ static ssize_t process_complete_pdu(pipes_struct *p)
if (!reply) {
DEBUG(3,("process_complete_pdu: DCE/RPC fault sent on pipe %s\n", p->pipe_srv_name));
set_incoming_fault(p);
- setup_fault_pdu(p);
+ setup_fault_pdu(p, 0x1c010002);
prs_mem_free(&rpc_in);
} else {
/*
diff --git a/source3/rpc_server/srv_samr.c b/source3/rpc_server/srv_samr.c
index 9ab8ad5d15..6cd0f3b854 100644
--- a/source3/rpc_server/srv_samr.c
+++ b/source3/rpc_server/srv_samr.c
@@ -725,6 +725,11 @@ static BOOL api_samr_set_userinfo(pipes_struct *p)
if (!samr_io_q_set_userinfo("", &q_u, data, 0)) {
DEBUG(0,("api_samr_set_userinfo: Unable to unmarshall SAMR_Q_SET_USERINFO.\n"));
+ /* Fix for W2K SP2 */
+ if (q_u.switch_value == 0x1a) {
+ setup_fault_pdu(p, 0x1c000006);
+ return True;
+ }
return False;
}