diff options
author | Jeremy Allison <jra@samba.org> | 2002-01-25 05:28:37 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-01-25 05:28:37 +0000 |
commit | 565b9cc1572e284ed5d9324f232249a32b76f164 (patch) | |
tree | 56786c8cff2e362bcc2bb42cbbbcb8b3e6841d1b /source3/rpc_server | |
parent | d82e73ae554274d0e982c82b7828ea3db4b10617 (diff) | |
download | samba-565b9cc1572e284ed5d9324f232249a32b76f164.tar.gz samba-565b9cc1572e284ed5d9324f232249a32b76f164.tar.bz2 samba-565b9cc1572e284ed5d9324f232249a32b76f164.zip |
Return correct RPC fault PDU on bad handle incoming.
Jeremy.
(This used to be commit 0db93d8752197e213f0974edae53e2dafdd77b51)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_lsa_hnd.c | 2 | ||||
-rw-r--r-- | source3/rpc_server/srv_pipe.c | 7 |
2 files changed, 9 insertions, 0 deletions
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); |