From 4245278ca3fea4a6b79daf58a8712a2774811c58 Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Thu, 18 Nov 1999 22:03:47 +0000 Subject: set "key does not exist" response to reg_query_val() (win32 status code of 0x2). [p.s. getting REALLY bored of this nt5rc2->samba domain stuff]. (This used to be commit a8801942f72b2394a54e4a46546029fac70efeed) --- source3/rpc_server/srv_reg.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'source3/rpc_server/srv_reg.c') diff --git a/source3/rpc_server/srv_reg.c b/source3/rpc_server/srv_reg.c index 18781d0cd0..10b9bac90c 100644 --- a/source3/rpc_server/srv_reg.c +++ b/source3/rpc_server/srv_reg.c @@ -187,23 +187,32 @@ static void reg_reply_info(REG_Q_INFO *q_u, uint32 status = 0; REG_R_INFO r_u; - uint32 type = 1; + uint32 type = 0xcafeface; BUFFER2 buf; + fstring name; + + ZERO_STRUCT(buf); DEBUG(5,("reg_info: %d\n", __LINE__)); - if (status == 0 && find_lsa_policy_by_hnd(&(q_u->pol)) == -1) + if (status == 0x0 && !get_lsa_policy_reg_name(&q_u->pol, name)) { status = 0xC000000 | NT_STATUS_INVALID_HANDLE; } - if (status == 0) + if (status == 0 && + strequal(name, "SYSTEM\\CurrentControlSet\\Control\\ProductOptions")) { char *key = "LanmanNT"; make_buffer2(&buf, key, strlen(key)); - make_reg_r_info(&r_u, &type, &buf, status); + type = 0x1; + } + else + { + status = 0x2; /* Win32 status code. ick */ } + make_reg_r_info(&r_u, &type, &buf, status); /* store the response in the SMB stream */ reg_io_r_info("", &r_u, rdata, 0); -- cgit