* RPC Pipe client / server routines
* Copyright (C) Andrew Tridgell 1992-2000,
* Copyright (C) Luke Kenneth Casson Leighton 1996-2000,
- * Copyright (C) Elrond 2000
+ * Copyright (C) Elrond 2000,
+ * Copyright (C) Tim Potter 2000
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
DEBUG(10, ("rpc_api_pipe_req: start: %d off: %d\n",
data_start, data->offset));
- if (!auth->cli_create_pdu(con, opnum, data, data_start,
+ if ((auth->cli_create_pdu != NULL) &&
+ !auth->cli_create_pdu(con, opnum, data, data_start,
&data_end, &data_t, &flags))
{
return False;
smb_io_rpc_hdr_resp("rpc_hdr_resp", &rhdr_resp, &rpdu, 0);
}
- if (rhdr.auth_len != 0
- && !auth->cli_decode_pdu(con, &rpdu, rhdr.frag_len,
- rhdr.auth_len))
+ if (rhdr.auth_len != 0 && (auth->cli_decode_pdu != NULL) &&
+ !auth->cli_decode_pdu(con, &rpdu, rhdr.frag_len,
+ rhdr.auth_len))
{
DEBUG(10, ("auth->cli_decode_pdu: failed\n"));
return False;
return False;
}
- if (rhdr.auth_len != 0 &&
+ if (rhdr.auth_len != 0 && (auth->cli_decode_pdu != NULL) &&
!auth->cli_decode_pdu(con, &rpdu, rhdr.frag_len,
rhdr.auth_len))
{
{
return False;
}
- if (rhdr.auth_len != 0 &&
+ if (rhdr.auth_len != 0 && (auth->cli_decode_pdu != NULL) &&
!auth->cli_decode_pdu(con, rdata, rhdr.frag_len,
rhdr.auth_len))
{
}
}
- if (rhdr.auth_len != 0
- && !auth->cli_decode_pdu(con, rdata, rhdr.frag_len,
- rhdr.auth_len))
+ if (rhdr.auth_len != 0 && (auth->cli_decode_pdu != NULL) &&
+ !auth->cli_decode_pdu(con, rdata, rhdr.frag_len,
+ rhdr.auth_len))
{
return False;
}
return False;
}
- if (rhdr.auth_len != 0 &&
+ if (rhdr.auth_len != 0 && (auth->cli_decode_pdu != NULL) &&
!auth->cli_decode_pdu(con, rdata, rhdr.frag_len, rhdr.auth_len))
{
return False;
rpc_call_id = get_rpc_call_id();
- if (!auth->create_bind_req(con, &data,
+ if ((auth->create_bind_req != NULL) &&
+ !auth->create_bind_req(con, &data,
rpc_call_id, abstract, transfer))
{
return False;
{
BOOL ret;
- if (l->auth != NULL)
+ if ((l->auth != NULL) && (l->auth->api_create_pdu != NULL))
{
ret = l->auth->api_create_pdu(l, data_start, resp);
}
if (l->auth != NULL)
{
- if (!l->auth->api_auth_chk(l, pkt_type))
+ if ((l->auth->api_auth_chk != NULL) &&
+ !l->auth->api_auth_chk(l, pkt_type))
{
if (l->auth_info != NULL)
{
smb_io_rpc_hdr_ba("", &l->hdr_ba, &l->rdata, 0);
prs_realloc_data(&l->rdata, l->rdata.offset);
- if (l->auth != NULL)
+ if ((l->auth != NULL) && (l->auth->api_auth_gen != NULL))
{
/***/
/*** now the authentication ***/
{
int i = 0;
- if (l->auth != NULL && l->auth_validated)
+ if ((l->auth != NULL) && (l->auth->api_decode_pdu != NULL) &&
+ l->auth_validated)
{
DEBUG(10, ("api_pipe_request: validated auth\n"));
if (!l->auth->api_decode_pdu(l))
}
case RPC_BINDRESP: /* not the real name! */
{
- if (l->auth != NULL)
+ if ((l->auth != NULL) &&
+ (l->auth->api_auth_chk != NULL))
{
reply = l->auth->api_auth_chk(l,
l->hdr.