diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/ntdomain.h | 6 | ||||
-rw-r--r-- | source3/rpc_server/srv_lsa_hnd.c | 2 | ||||
-rw-r--r-- | source3/rpc_server/srv_pipe.c | 7 |
3 files changed, 15 insertions, 0 deletions
diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h index 7950119e50..a2f7de0c2a 100644 --- a/source3/include/ntdomain.h +++ b/source3/include/ntdomain.h @@ -213,6 +213,12 @@ typedef struct pipes_struct */ BOOL fault_state; + + /* + * Set to true when we should return fault PDU's for a bad handle. + */ + + BOOL bad_handle_fault_state; /* * Set to RPC_BIG_ENDIAN when dealing with big-endian PDU's diff --git a/source3/rpc_server/srv_lsa_hnd.c b/source3/rpc_server/srv_lsa_hnd.c index 5affa9f5b0..65f43c82e2 100644 --- a/source3/rpc_server/srv_lsa_hnd.c +++ b/source3/rpc_server/srv_lsa_hnd.c @@ -157,6 +157,8 @@ static struct policy *find_policy_by_hnd_internal(pipes_struct *p, POLICY_HND *h DEBUG(4,("Policy not found: ")); dump_data(4, (char *)hnd, sizeof(*hnd)); + p->bad_handle_fault_state = True; + return NULL; } diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c index 2630729281..45e5567d1b 100644 --- a/source3/rpc_server/srv_pipe.c +++ b/source3/rpc_server/srv_pipe.c @@ -1188,6 +1188,13 @@ BOOL api_rpcTNP(pipes_struct *p, char *rpc_name, return False; } + if (p->bad_handle_fault_state) { + DEBUG(4,("api_rpcTNP: bad handle fault return.\n")); + p->bad_handle_fault_state = False; + setup_fault_pdu(p, NT_STATUS(0x1C00001A)); + return True; + } + slprintf(name, sizeof(name)-1, "out_%s", rpc_name); offset2 = prs_offset(&p->out_data.rdata); prs_set_offset(&p->out_data.rdata, offset1); |