From f2e0bbffb5e40df4850b6bd0eae73a8fb0edc6d7 Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Mon, 26 Jul 1999 21:47:23 +0000 Subject: [PATCH] renaming AUTH VERIFIER to AUTH NTLMSSP VERIFIER. ready for adding another RPC authentication system. (This used to be commit 1a211bafebad8c63d98b5ef275a6272013527c65) --- source3/include/ntdomain.h | 10 +++++----- source3/include/proto.h | 6 +++--- source3/include/rpc_dce.h | 7 +++---- source3/rpc_client/cli_pipe.c | 28 ++++++++++++++-------------- source3/rpc_parse/parse_rpc.c | 15 ++++++++------- source3/rpc_server/srv_pipe.c | 10 +++++----- 6 files changed, 38 insertions(+), 38 deletions(-) diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h index 9ba096bb130..6f4e78d3704 100644 --- a/source3/include/ntdomain.h +++ b/source3/include/ntdomain.h @@ -87,11 +87,11 @@ typedef struct pipes_struct RPC_HDR_AUTH auth_info; RPC_HDR_AUTHA autha_info; - RPC_AUTH_VERIFIER auth_verifier; - RPC_AUTH_NTLMSSP_NEG ntlmssp_neg; - RPC_AUTH_NTLMSSP_CHAL ntlmssp_chal; - RPC_AUTH_NTLMSSP_RESP ntlmssp_resp; - RPC_AUTH_NTLMSSP_CHK ntlmssp_chk; + RPC_AUTH_NTLMSSP_VERIFIER auth_verifier; + RPC_AUTH_NTLMSSP_NEG ntlmssp_neg; + RPC_AUTH_NTLMSSP_CHAL ntlmssp_chal; + RPC_AUTH_NTLMSSP_RESP ntlmssp_resp; + RPC_AUTH_NTLMSSP_CHK ntlmssp_chk; BOOL ntlmssp_auth; BOOL ntlmssp_validated; diff --git a/source3/include/proto.h b/source3/include/proto.h index d7ab61cb614..04b002ae574 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -2393,11 +2393,11 @@ void make_rpc_hdr_auth(RPC_HDR_AUTH *rai, uint8 stub_type_len, uint32 ptr); void smb_io_rpc_hdr_auth(char *desc, RPC_HDR_AUTH *rai, prs_struct *ps, int depth); -BOOL rpc_auth_verifier_chk(RPC_AUTH_VERIFIER *rav, +BOOL rpc_auth_ntlmssp_verifier_chk(RPC_AUTH_NTLMSSP_VERIFIER *rav, char *signature, uint32 msg_type); -void make_rpc_auth_verifier(RPC_AUTH_VERIFIER *rav, +void make_rpc_auth_ntlmssp_verifier(RPC_AUTH_NTLMSSP_VERIFIER *rav, char *signature, uint32 msg_type); -void smb_io_rpc_auth_verifier(char *desc, RPC_AUTH_VERIFIER *rav, prs_struct *ps, int depth); +void smb_io_rpc_auth_ntlmssp_verifier(char *desc, RPC_AUTH_NTLMSSP_VERIFIER *rav, prs_struct *ps, int depth); void make_rpc_auth_ntlmssp_neg(RPC_AUTH_NTLMSSP_NEG *neg, uint32 neg_flgs, fstring myname, fstring domain); diff --git a/source3/include/rpc_dce.h b/source3/include/rpc_dce.h index 3a2956cb6d4..3b2b3071d25 100644 --- a/source3/include/rpc_dce.h +++ b/source3/include/rpc_dce.h @@ -26,7 +26,6 @@ #include "rpc_misc.h" /* this only pulls in STRHDR */ - /* DCE/RPC packet types */ enum RPC_PKT_TYPE @@ -218,13 +217,13 @@ typedef struct rpc_hdr_ba_info } RPC_HDR_BA; -/* RPC_AUTH_VERIFIER */ -typedef struct rpc_auth_verif_info +/* RPC_AUTH_NTLMSSP_VERIFIER */ +typedef struct rpc_auth_ntlmssp_verif_info { fstring signature; /* "NTLMSSP" */ uint32 msg_type; /* NTLMSSP_MESSAGE_TYPE (1,2,3) */ -} RPC_AUTH_VERIFIER; +} RPC_AUTH_NTLMSSP_VERIFIER; /* this is TEMPORARILY coded up as a specific structure */ /* this structure comes after the bind request */ diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c index c8f25938589..d5745adb558 100644 --- a/source3/rpc_client/cli_pipe.c +++ b/source3/rpc_client/cli_pipe.c @@ -408,7 +408,7 @@ static BOOL create_rpc_bind_req(prs_struct *rhdr, RPC_HDR_RB hdr_rb; RPC_HDR hdr; RPC_HDR_AUTH hdr_auth; - RPC_AUTH_VERIFIER auth_verifier; + RPC_AUTH_NTLMSSP_VERIFIER auth_verifier; RPC_AUTH_NTLMSSP_NEG ntlmssp_neg; /* create the bind request RPC_HDR_RB */ @@ -425,10 +425,10 @@ static BOOL create_rpc_bind_req(prs_struct *rhdr, smb_io_rpc_hdr_auth("hdr_auth", &hdr_auth, rhdr_auth, 0); mem_realloc_data(rhdr_auth->data, rhdr_auth->offset); - make_rpc_auth_verifier(&auth_verifier, + make_rpc_auth_ntlmssp_verifier(&auth_verifier, "NTLMSSP", NTLMSSP_NEGOTIATE); - smb_io_rpc_auth_verifier("auth_verifier", &auth_verifier, auth_req, 0); + smb_io_rpc_auth_ntlmssp_verifier("auth_verifier", &auth_verifier, auth_req, 0); mem_realloc_data(auth_req->data, auth_req->offset); make_rpc_auth_ntlmssp_neg(&ntlmssp_neg, @@ -493,19 +493,19 @@ static BOOL create_rpc_bind_resp(struct pwd_info *pwd, unsigned char lm_owf[24]; unsigned char nt_owf[128]; size_t nt_owf_len; - RPC_HDR hdr; - RPC_HDR_AUTHA hdr_autha; - RPC_AUTH_VERIFIER auth_verifier; - RPC_AUTH_NTLMSSP_RESP ntlmssp_resp; + RPC_HDR hdr; + RPC_HDR_AUTHA hdr_autha; + RPC_AUTH_NTLMSSP_VERIFIER auth_verifier; + RPC_AUTH_NTLMSSP_RESP ntlmssp_resp; make_rpc_hdr_autha(&hdr_autha, 0x1630, 0x1630, 0x0a, 0x06, 0x00); smb_io_rpc_hdr_autha("hdr_autha", &hdr_autha, rhdr_autha, 0); mem_realloc_data(rhdr_autha->data, rhdr_autha->offset); - make_rpc_auth_verifier(&auth_verifier, + make_rpc_auth_ntlmssp_verifier(&auth_verifier, "NTLMSSP", NTLMSSP_AUTH); - smb_io_rpc_auth_verifier("auth_verifier", &auth_verifier, auth_resp, 0); + smb_io_rpc_auth_ntlmssp_verifier("auth_verifier", &auth_verifier, auth_resp, 0); mem_realloc_data(auth_resp->data, auth_resp->offset); pwd_get_lm_nt_owf(pwd, lm_owf, nt_owf, &nt_owf_len); @@ -876,10 +876,10 @@ static BOOL rpc_pipe_bind(struct cli_state *cli, uint16 nt_pipe_fnum, /* send data on \PIPE\. receive a response */ if (rpc_api_pipe(cli, nt_pipe_fnum, 0x0026, NULL, &data, &rparam, &rdata)) { - RPC_HDR_BA hdr_ba; - RPC_HDR_AUTH rhdr_auth; - RPC_AUTH_VERIFIER rhdr_verf; - RPC_AUTH_NTLMSSP_CHAL rhdr_chal; + RPC_HDR_BA hdr_ba; + RPC_HDR_AUTH rhdr_auth; + RPC_AUTH_NTLMSSP_VERIFIER rhdr_verf; + RPC_AUTH_NTLMSSP_CHAL rhdr_chal; DEBUG(5, ("rpc_api_pipe: return OK\n")); @@ -904,7 +904,7 @@ static BOOL rpc_pipe_bind(struct cli_state *cli, uint16 nt_pipe_fnum, if (valid_ack && ntlmssp_auth) { - smb_io_rpc_auth_verifier("", &rhdr_verf, &rdata, 0); + smb_io_rpc_auth_ntlmssp_verifier("", &rhdr_verf, &rdata, 0); if (rdata.offset == 0) valid_ack = False; } if (valid_ack && ntlmssp_auth) diff --git a/source3/rpc_parse/parse_rpc.c b/source3/rpc_parse/parse_rpc.c index 3066d94decf..138dbd90b14 100644 --- a/source3/rpc_parse/parse_rpc.c +++ b/source3/rpc_parse/parse_rpc.c @@ -505,7 +505,8 @@ checks an RPC_HDR_AUTH structure. ********************************************************************/ BOOL rpc_hdr_auth_chk(RPC_HDR_AUTH *rai) { - return (rai->auth_type == 0x0a && rai->auth_level == 0x06); + return ((rai->auth_type == 0x0a || rai->auth_type == 0x44) && + rai->auth_level == 0x06); } /******************************************************************* @@ -545,18 +546,18 @@ void smb_io_rpc_hdr_auth(char *desc, RPC_HDR_AUTH *rai, prs_struct *ps, int dept } /******************************************************************* -checks an RPC_AUTH_VERIFIER structure. +checks an RPC_AUTH_NTLMSSP_VERIFIER structure. ********************************************************************/ -BOOL rpc_auth_verifier_chk(RPC_AUTH_VERIFIER *rav, +BOOL rpc_auth_ntlmssp_verifier_chk(RPC_AUTH_NTLMSSP_VERIFIER *rav, char *signature, uint32 msg_type) { return (strequal(rav->signature, signature) && rav->msg_type == msg_type); } /******************************************************************* -creates an RPC_AUTH_VERIFIER structure. +creates an RPC_AUTH_NTLMSSP_VERIFIER structure. ********************************************************************/ -void make_rpc_auth_verifier(RPC_AUTH_VERIFIER *rav, +void make_rpc_auth_ntlmssp_verifier(RPC_AUTH_NTLMSSP_VERIFIER *rav, char *signature, uint32 msg_type) { if (rav == NULL) return; @@ -566,9 +567,9 @@ void make_rpc_auth_verifier(RPC_AUTH_VERIFIER *rav, } /******************************************************************* -reads or writes an RPC_AUTH_VERIFIER structure. +reads or writes an RPC_AUTH_NTLMSSP_VERIFIER structure. ********************************************************************/ -void smb_io_rpc_auth_verifier(char *desc, RPC_AUTH_VERIFIER *rav, prs_struct *ps, int depth) +void smb_io_rpc_auth_ntlmssp_verifier(char *desc, RPC_AUTH_NTLMSSP_VERIFIER *rav, prs_struct *ps, int depth) { if (rav == NULL) return; diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c index 3e5d9869351..458d7e883c8 100644 --- a/source3/rpc_server/srv_pipe.c +++ b/source3/rpc_server/srv_pipe.c @@ -388,10 +388,10 @@ static BOOL api_pipe_bind_auth_resp(pipes_struct *p, prs_struct *pd) if (!rpc_hdr_auth_chk(&(p->auth_info))) return False; - smb_io_rpc_auth_verifier("", &p->auth_verifier, pd, 0); + smb_io_rpc_auth_ntlmssp_verifier("", &p->auth_verifier, pd, 0); if (pd->offset == 0) return False; - if (!rpc_auth_verifier_chk(&(p->auth_verifier), "NTLMSSP", NTLMSSP_AUTH)) return False; + if (!rpc_auth_ntlmssp_verifier_chk(&(p->auth_verifier), "NTLMSSP", NTLMSSP_AUTH)) return False; return api_pipe_ntlmssp(p, pd); } @@ -436,7 +436,7 @@ static BOOL api_pipe_bind_and_alt_req(pipes_struct *p, prs_struct *pd, enum RPC_ if (p->ntlmssp_auth) { - smb_io_rpc_auth_verifier("", &p->auth_verifier, pd, 0); + smb_io_rpc_auth_ntlmssp_verifier("", &p->auth_verifier, pd, 0); if (pd->offset == 0) return False; p->ntlmssp_auth = strequal(p->auth_verifier.signature, "NTLMSSP"); @@ -521,9 +521,9 @@ static BOOL api_pipe_bind_and_alt_req(pipes_struct *p, prs_struct *pd, enum RPC_ /*** NTLMSSP verifier ***/ - make_rpc_auth_verifier(&p->auth_verifier, + make_rpc_auth_ntlmssp_verifier(&p->auth_verifier, "NTLMSSP", NTLMSSP_CHALLENGE); - smb_io_rpc_auth_verifier("", &p->auth_verifier, &p->rauth, 0); + smb_io_rpc_auth_ntlmssp_verifier("", &p->auth_verifier, &p->rauth, 0); mem_realloc_data(p->rauth.data, p->rauth.offset); /* NTLMSSP challenge ***/ -- 2.34.1