Tims SMB_ASSERT for checking, that cli_auth_fns functions
authorElrond <elrond@samba.org>
Thu, 30 Mar 2000 19:14:08 +0000 (19:14 +0000)
committerElrond <elrond@samba.org>
Thu, 30 Mar 2000 19:14:08 +0000 (19:14 +0000)
are NULL just broke my anonymous lsaq.
I undid two of his things, until at least that worked
again.
(Look at rpc_client/cli_pipe_noauth.c, 3 of 5 functions are
NULL here.)

Luke, can you take a look at the other SMB_ASSERTs?

    Elrond

source/rpc_client/cli_pipe.c

index c6ed46075ce058e3bc325250b4eee710748132b7..283cea7a66eeeed232a2e58dd61989c19a79c831 100644 (file)
@@ -357,11 +357,10 @@ BOOL rpc_api_pipe_req(struct cli_connection *con, uint8 opnum,
                smb_io_rpc_hdr_resp("rpc_hdr_resp", &rhdr_resp, &rpdu, 0);
        }
 
-        SMB_ASSERT(auth->cli_decode_pdu != NULL);
-
-       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;
@@ -1006,10 +1005,8 @@ BOOL rpc_pipe_bind(struct cli_connection *con,
                        nt->max_recv_frag = hdr_ba.bba.max_rsize;
                }
 
-               if (valid_ack)
+               if (valid_ack && auth->decode_bind_resp != NULL)
                {
-                        SMB_ASSERT(auth->decode_bind_resp != NULL);
-
                        valid_ack = auth->decode_bind_resp(con, &rdata);
 
                        if (valid_ack)