summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2002-07-29 19:45:15 +0000
committerGerald Carter <jerry@samba.org>2002-07-29 19:45:15 +0000
commitc17dc6c55c3a5a2912028a1d6a713f26b3b91c63 (patch)
tree6887d62732d1b9f10d164fd314ccf97de626a1d4 /source3/rpc_server
parent9f7e67c6f9eec4f21d5afbe323dc1c664ff52b54 (diff)
downloadsamba-c17dc6c55c3a5a2912028a1d6a713f26b3b91c63.tar.gz
samba-c17dc6c55c3a5a2912028a1d6a713f26b3b91c63.tar.bz2
samba-c17dc6c55c3a5a2912028a1d6a713f26b3b91c63.zip
add another registry rpc (opnum 0x14). Have no idea what it's real name
is. I'm calling it REG_SAVE_KEY, because 2k preps a regedt32.exe Registry->Save Key with this call. Done in the process of tracking down a PrinterDriverData issue. (This used to be commit 66104a361424f10cc986c597b91afa6f12b3cd8a)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_reg.c26
-rw-r--r--source3/rpc_server/srv_reg_nt.c24
2 files changed, 50 insertions, 0 deletions
diff --git a/source3/rpc_server/srv_reg.c b/source3/rpc_server/srv_reg.c
index cb96005db1..d0aaf0199b 100644
--- a/source3/rpc_server/srv_reg.c
+++ b/source3/rpc_server/srv_reg.c
@@ -341,6 +341,31 @@ static BOOL api_reg_enum_value(pipes_struct *p)
return True;
}
+/*******************************************************************
+ api_reg_save_key
+ ********************************************************************/
+
+static BOOL api_reg_save_key(pipes_struct *p)
+{
+ REG_Q_SAVE_KEY q_u;
+ REG_R_SAVE_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_save_key("", &q_u, data, 0))
+ return False;
+
+ r_u.status = _reg_save_key(p, &q_u, &r_u);
+
+ if(!reg_io_r_save_key("", &r_u, rdata, 0))
+ return False;
+
+ return True;
+}
+
/*******************************************************************
@@ -360,6 +385,7 @@ static struct api_struct api_reg_cmds[] =
{ "REG_SHUTDOWN" , REG_SHUTDOWN , api_reg_shutdown },
{ "REG_ABORT_SHUTDOWN" , REG_ABORT_SHUTDOWN , api_reg_abort_shutdown },
{ "REG_UNKNOWN_1A" , REG_UNKNOWN_1A , api_reg_unknown_1a },
+ { "REG_SAVE_KEY" , REG_SAVE_KEY , api_reg_save_key },
{ NULL , 0 , NULL }
};
diff --git a/source3/rpc_server/srv_reg_nt.c b/source3/rpc_server/srv_reg_nt.c
index 7ebf940588..cd9596d2a7 100644
--- a/source3/rpc_server/srv_reg_nt.c
+++ b/source3/rpc_server/srv_reg_nt.c
@@ -622,4 +622,28 @@ NTSTATUS _reg_abort_shutdown(pipes_struct *p, REG_Q_ABORT_SHUTDOWN *q_u, REG_R_A
return status;
}
+/*******************************************************************
+ REG_SAVE_KEY (0x14)
+ ********************************************************************/
+
+NTSTATUS _reg_save_key(pipes_struct *p, REG_Q_SAVE_KEY *q_u, REG_R_SAVE_KEY *r_u)
+{
+ REGISTRY_KEY *regkey = find_regkey_index_by_hnd( p, &q_u->pol );
+
+ DEBUG(5,("_reg_save_key: Enter\n"));
+
+ /*
+ * basically this is a no op function which just gverifies
+ * that the client gave us a valid registry key handle
+ */
+
+ if ( !regkey )
+ return NT_STATUS_INVALID_HANDLE;
+
+ DEBUG(8,("_reg_save_key: berifying backup of key [%s]\n", regkey->name));
+
+
+ return NT_STATUS_OK;
+}
+