summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_reg.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/source3/rpc_server/srv_reg.c b/source3/rpc_server/srv_reg.c
index 6a8d803c2e..cba24d7dfb 100644
--- a/source3/rpc_server/srv_reg.c
+++ b/source3/rpc_server/srv_reg.c
@@ -23,6 +23,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+
#include "includes.h"
extern int DEBUGLEVEL;
@@ -59,7 +60,7 @@ static void reg_reply_close(REG_Q_CLOSE *q_r,
/*******************************************************************
api_reg_close
********************************************************************/
-static BOOL api_reg_close(prs_struct *data, prs_struct *rdata)
+static BOOL api_reg_close(prs_struct *data, prs_struct *rdata )
{
REG_Q_CLOSE q_r;
@@ -99,7 +100,7 @@ static void reg_reply_open(REG_Q_OPEN_HKLM *q_r,
/*******************************************************************
api_reg_open
********************************************************************/
-static BOOL api_reg_open(prs_struct *data, prs_struct *rdata)
+static BOOL api_reg_open(prs_struct *data, prs_struct *rdata )
{
REG_Q_OPEN_HKLM q_u;
@@ -164,7 +165,7 @@ static void reg_reply_open_entry(REG_Q_OPEN_ENTRY *q_u,
/*******************************************************************
api_reg_open_entry
********************************************************************/
-static BOOL api_reg_open_entry(prs_struct *data, prs_struct *rdata)
+static BOOL api_reg_open_entry(prs_struct *data, prs_struct *rdata )
{
REG_Q_OPEN_ENTRY q_u;
@@ -185,6 +186,11 @@ static void reg_reply_info(REG_Q_INFO *q_u,
prs_struct *rdata)
{
uint32 status = 0;
+ fstring key = "ServerNT"; /* always a non-PDC */
+ uint32 type=0x1; /* key type: REG_SZ */
+
+ UNISTR2 uni_key;
+ BUFFER2 buf;
REG_R_INFO r_u;
@@ -195,14 +201,13 @@ static void reg_reply_info(REG_Q_INFO *q_u,
status = 0xC000000 | NT_STATUS_INVALID_HANDLE;
}
- if (status == 0)
- {
- }
-
/* This makes the server look like a member server to clients */
/* which tells clients that we have our own local user and */
/* group databases and helps with ACL support. */
- init_reg_r_info(&r_u, 1, "ServerNT", 0x12, 0x12, status);
+ init_unistr2(&uni_key, key, strlen(key)+1);
+ init_buffer2(&buf, (uint8*) uni_key.buffer, uni_key.uni_str_len*2);
+
+ init_reg_r_info(q_u->ptr_buf, &r_u, &buf, type, status);
/* store the response in the SMB stream */
reg_io_r_info("", &r_u, rdata, 0);
@@ -213,7 +218,7 @@ static void reg_reply_info(REG_Q_INFO *q_u,
/*******************************************************************
api_reg_info
********************************************************************/
-static BOOL api_reg_info(prs_struct *data, prs_struct *rdata)
+static BOOL api_reg_info(prs_struct *data, prs_struct *rdata )
{
REG_Q_INFO q_u;
@@ -246,5 +251,4 @@ BOOL api_reg_rpc(pipes_struct *p, prs_struct *data)
{
return api_rpcTNP(p, "api_reg_rpc", api_reg_cmds, data);
}
-
#undef OLD_NTDOMAIN