svn commit: samba r7645 - in branches/SAMBA_3_0/source: include
rpc_client rpc_parse rpc_server
jerry at samba.org
jerry at samba.org
Thu Jun 16 20:04:17 GMT 2005
Author: jerry
Date: 2005-06-16 20:04:16 +0000 (Thu, 16 Jun 2005)
New Revision: 7645
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7645
Log:
adding server stubs for RegCreateKey() and RegSetValue()
Modified:
branches/SAMBA_3_0/source/include/rpc_reg.h
branches/SAMBA_3_0/source/rpc_client/cli_reg.c
branches/SAMBA_3_0/source/rpc_parse/parse_reg.c
branches/SAMBA_3_0/source/rpc_server/srv_reg.c
branches/SAMBA_3_0/source/rpc_server/srv_reg_nt.c
Changeset:
Modified: branches/SAMBA_3_0/source/include/rpc_reg.h
===================================================================
--- branches/SAMBA_3_0/source/include/rpc_reg.h 2005-06-16 19:53:14 UTC (rev 7644)
+++ branches/SAMBA_3_0/source/include/rpc_reg.h 2005-06-16 20:04:16 UTC (rev 7645)
@@ -215,7 +215,7 @@
/***********************************************/
typedef struct {
- POLICY_HND pnt_pol;
+ POLICY_HND handle;
UNISTR4 name;
UNISTR4 class;
uint32 reserved;
@@ -237,7 +237,7 @@
/***********************************************/
typedef struct {
- POLICY_HND pnt_pol;
+ POLICY_HND handle;
UNISTR4 name;
} REG_Q_DELETE_KEY;
@@ -249,7 +249,7 @@
/***********************************************/
typedef struct {
- POLICY_HND pnt_pol;
+ POLICY_HND handle;
UNISTR4 name;
} REG_Q_DELETE_VALUE;
Modified: branches/SAMBA_3_0/source/rpc_client/cli_reg.c
===================================================================
--- branches/SAMBA_3_0/source/rpc_client/cli_reg.c 2005-06-16 19:53:14 UTC (rev 7644)
+++ branches/SAMBA_3_0/source/rpc_client/cli_reg.c 2005-06-16 20:04:16 UTC (rev 7645)
@@ -539,8 +539,8 @@
CLI_DO_RPC( cli, mem_ctx, PI_WINREG, REG_SET_VALUE,
in, out,
qbuf, rbuf,
- reg_io_q_set_val,
- reg_io_r_set_val,
+ reg_io_q_set_value,
+ reg_io_r_set_value,
WERR_GENERAL_FAILURE );
return out.status;
Modified: branches/SAMBA_3_0/source/rpc_parse/parse_reg.c
===================================================================
--- branches/SAMBA_3_0/source/rpc_parse/parse_reg.c 2005-06-16 19:53:14 UTC (rev 7644)
+++ branches/SAMBA_3_0/source/rpc_parse/parse_reg.c 2005-06-16 20:04:16 UTC (rev 7645)
@@ -212,7 +212,7 @@
{
ZERO_STRUCTP(q_c);
- memcpy(&q_c->pnt_pol, hnd, sizeof(q_c->pnt_pol));
+ memcpy(&q_c->handle, hnd, sizeof(q_c->handle));
init_unistr4( &q_c->name, name, UNI_STR_TERMINATE );
@@ -246,7 +246,7 @@
if(!prs_align(ps))
return False;
- if(!smb_io_pol_hnd("", &q_u->pnt_pol, ps, depth))
+ if(!smb_io_pol_hnd("", &q_u->handle, ps, depth))
return False;
if(!prs_unistr4 ("name", ps, depth, &q_u->name))
@@ -318,7 +318,7 @@
{
ZERO_STRUCTP(q_c);
- memcpy(&q_c->pnt_pol, hnd, sizeof(q_c->pnt_pol));
+ memcpy(&q_c->handle, hnd, sizeof(q_c->handle));
init_unistr4(&q_c->name, name, UNI_STR_TERMINATE);
}
@@ -338,7 +338,7 @@
if(!prs_align(ps))
return False;
- if(!smb_io_pol_hnd("", &q_u->pnt_pol, ps, depth))
+ if(!smb_io_pol_hnd("", &q_u->handle, ps, depth))
return False;
if(!prs_unistr4("name", ps, depth, &q_u->name))
@@ -381,7 +381,7 @@
{
ZERO_STRUCTP(q_c);
- memcpy(&q_c->pnt_pol, hnd, sizeof(q_c->pnt_pol));
+ memcpy(&q_c->handle, hnd, sizeof(q_c->handle));
init_unistr4(&q_c->name, name, UNI_STR_TERMINATE);
}
@@ -402,7 +402,7 @@
if(!prs_align(ps))
return False;
- if(!smb_io_pol_hnd("", &q_u->pnt_pol, ps, depth))
+ if(!smb_io_pol_hnd("", &q_u->handle, ps, depth))
return False;
if(!prs_unistr4("", ps, depth, &q_u->name))
@@ -1232,7 +1232,7 @@
reads or writes a structure.
********************************************************************/
-BOOL reg_io_q_set_val(const char *desc, REG_Q_SET_VALUE *q_u, prs_struct *ps, int depth)
+BOOL reg_io_q_set_value(const char *desc, REG_Q_SET_VALUE *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
@@ -1269,7 +1269,7 @@
reads or writes a structure.
********************************************************************/
-BOOL reg_io_r_set_val(const char *desc, REG_R_SET_VALUE *q_u, prs_struct *ps, int depth)
+BOOL reg_io_r_set_value(const char *desc, REG_R_SET_VALUE *q_u, prs_struct *ps, int depth)
{
if ( !q_u )
return False;
Modified: branches/SAMBA_3_0/source/rpc_server/srv_reg.c
===================================================================
--- branches/SAMBA_3_0/source/rpc_server/srv_reg.c 2005-06-16 19:53:14 UTC (rev 7644)
+++ branches/SAMBA_3_0/source/rpc_server/srv_reg.c 2005-06-16 20:04:16 UTC (rev 7645)
@@ -417,6 +417,54 @@
}
/*******************************************************************
+ ******************************************************************/
+
+static BOOL api_reg_create_key(pipes_struct *p)
+{
+ REG_Q_CREATE_KEY q_u;
+ REG_R_CREATE_KEY r_u;
+ prs_struct *data = &p->in_data.data;
+ prs_struct *rdata = &p->out_data.rdata;
+
+ ZERO_STRUCT(q_u);
+ ZERO_STRUCT(r_u);
+
+ if(!reg_io_q_create_key("", &q_u, data, 0))
+ return False;
+
+ r_u.status = _reg_create_key(p, &q_u, &r_u);
+
+ if(!reg_io_r_create_key("", &r_u, rdata, 0))
+ return False;
+
+ return True;
+}
+
+/*******************************************************************
+ ******************************************************************/
+
+static BOOL api_reg_set_value(pipes_struct *p)
+{
+ REG_Q_SET_VALUE q_u;
+ REG_R_SET_VALUE r_u;
+ prs_struct *data = &p->in_data.data;
+ prs_struct *rdata = &p->out_data.rdata;
+
+ ZERO_STRUCT(q_u);
+ ZERO_STRUCT(r_u);
+
+ if(!reg_io_q_set_value("", &q_u, data, 0))
+ return False;
+
+ r_u.status = _reg_set_value(p, &q_u, &r_u);
+
+ if(!reg_io_r_set_value("", &r_u, rdata, 0))
+ return False;
+
+ return True;
+}
+
+/*******************************************************************
array of \PIPE\reg operations
********************************************************************/
@@ -436,7 +484,9 @@
{ "REG_ABORT_SHUTDOWN" , REG_ABORT_SHUTDOWN , api_reg_abort_shutdown },
{ "REG_GETVERSION" , REG_GETVERSION , api_reg_getversion },
{ "REG_SAVE_KEY" , REG_SAVE_KEY , api_reg_save_key },
- { "REG_RESTORE_KEY" , REG_RESTORE_KEY , api_reg_restore_key }
+ { "REG_RESTORE_KEY" , REG_RESTORE_KEY , api_reg_restore_key },
+ { "REG_CREATE_KEY" , REG_CREATE_KEY , api_reg_create_key },
+ { "REG_SET_VALUE" , REG_SET_VALUE , api_reg_set_value }
};
void reg_get_pipe_fns( struct api_struct **fns, int *n_fns )
Modified: branches/SAMBA_3_0/source/rpc_server/srv_reg_nt.c
===================================================================
--- branches/SAMBA_3_0/source/rpc_server/srv_reg_nt.c 2005-06-16 19:53:14 UTC (rev 7644)
+++ branches/SAMBA_3_0/source/rpc_server/srv_reg_nt.c 2005-06-16 20:04:16 UTC (rev 7645)
@@ -1071,4 +1071,20 @@
return WERR_OK;
}
+/*******************************************************************
+ ********************************************************************/
+WERROR _reg_create_key(pipes_struct *p, REG_Q_CREATE_KEY *q_u, REG_R_CREATE_KEY *r_u)
+{
+ return WERR_ACCESS_DENIED;
+}
+
+
+/*******************************************************************
+ ********************************************************************/
+
+WERROR _reg_set_value(pipes_struct *p, REG_Q_SET_VALUE *q_u, REG_R_SET_VALUE *r_u)
+{
+ return WERR_ACCESS_DENIED;
+}
+
More information about the samba-cvs
mailing list