1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

Return correct RPC fault PDU on bad handle incoming.

Jeremy.
(This used to be commit 0db93d8752197e213f0974edae53e2dafdd77b51)
This commit is contained in:
Jeremy Allison 2002-01-25 05:28:37 +00:00
parent d82e73ae55
commit 565b9cc157
3 changed files with 15 additions and 0 deletions

View File

@ -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

View File

@ -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;
}

View File

@ -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);