diff options
author | Luke Leighton <lkcl@samba.org> | 1999-11-18 22:03:47 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1999-11-18 22:03:47 +0000 |
commit | 4245278ca3fea4a6b79daf58a8712a2774811c58 (patch) | |
tree | d89a4a899a1b9ecf3518385d90bd5e62776f62a3 /source3/rpc_server/srv_reg.c | |
parent | e3b2f276e04bce6365dfb1a7e0b904b7c788c364 (diff) | |
download | samba-4245278ca3fea4a6b79daf58a8712a2774811c58.tar.gz samba-4245278ca3fea4a6b79daf58a8712a2774811c58.tar.bz2 samba-4245278ca3fea4a6b79daf58a8712a2774811c58.zip |
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)
Diffstat (limited to 'source3/rpc_server/srv_reg.c')
-rw-r--r-- | source3/rpc_server/srv_reg.c | 17 |
1 files changed, 13 insertions, 4 deletions
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); |