[SCM] Samba Shared Repository - branch master updated
Volker Lendecke
vlendec at samba.org
Mon Apr 11 14:10:01 MDT 2011
The branch, master has been updated
via d1ded27 s3: Wrap creating the svcctl keys in a transaction
via a5495e7 s3: Make reg_backend_db.h includable by itself (cherry picked from commit 6ba31d3bd29dd11b1b98859f4d8a65d9be7dac60)
from 5cd6d93 s3: Fix Coverity ID 2472, UNINIT
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit d1ded271b6e8f8ff7f09c4830411e389d26b1b10
Author: Volker Lendecke <vl at samba.org>
Date: Sat Apr 9 18:15:12 2011 +0200
s3: Wrap creating the svcctl keys in a transaction
This makes the startup of smbd in make test much quicker and thus more reliable
(cherry picked from commit f1aa38b414e97d8687d0bebf65baa384f75301b4)
Autobuild-User: Volker Lendecke <vlendec at samba.org>
Autobuild-Date: Mon Apr 11 22:09:58 CEST 2011 on sn-devel-104
commit a5495e70cc5f7659ab94d8570195edf3bd41072b
Author: Volker Lendecke <vl at samba.org>
Date: Sat Apr 9 18:13:59 2011 +0200
s3: Make reg_backend_db.h includable by itself
(cherry picked from commit 6ba31d3bd29dd11b1b98859f4d8a65d9be7dac60)
-----------------------------------------------------------------------
Summary of changes:
source3/registry/reg_backend_db.h | 1 +
source3/rpc_server/svcctl/srv_svcctl_reg.c | 28 ++++++++++++++++++++++++++++
2 files changed, 29 insertions(+), 0 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/registry/reg_backend_db.h b/source3/registry/reg_backend_db.h
index fbdcfb4..9d5ff90 100644
--- a/source3/registry/reg_backend_db.h
+++ b/source3/registry/reg_backend_db.h
@@ -21,6 +21,7 @@
#ifndef _REG_BACKEND_DB_H
#define _REG_BACKEND_DB_H
+#include "registry.h"
WERROR init_registry_key(const char *add_path);
WERROR init_registry_data(void);
diff --git a/source3/rpc_server/svcctl/srv_svcctl_reg.c b/source3/rpc_server/svcctl/srv_svcctl_reg.c
index d262ff8..eb0c2bd 100644
--- a/source3/rpc_server/svcctl/srv_svcctl_reg.c
+++ b/source3/rpc_server/svcctl/srv_svcctl_reg.c
@@ -30,6 +30,7 @@
#include "rpc_client/cli_winreg.h"
#include "rpc_server/svcctl/srv_svcctl_reg.h"
#include "auth.h"
+#include "registry/reg_backend_db.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_REGISTRY
@@ -575,6 +576,19 @@ bool svcctl_init_winreg(struct messaging_context *msg_ctx)
goto done;
}
+ result = regdb_open();
+ if (!W_ERROR_IS_OK(result)) {
+ DEBUG(10, ("regdb_open failed: %s\n",
+ win_errstr(result)));
+ goto done;
+ }
+ result = regdb_transaction_start();
+ if (!W_ERROR_IS_OK(result)) {
+ DEBUG(10, ("regdb_transaction_start failed: %s\n",
+ win_errstr(result)));
+ goto done;
+ }
+
status = dcerpc_winreg_int_hklm_openkey(tmp_ctx,
get_session_info_system(),
msg_ctx,
@@ -674,6 +688,20 @@ done:
dcerpc_winreg_CloseKey(h, tmp_ctx, &key_hnd, &result);
}
+ if (ok) {
+ result = regdb_transaction_commit();
+ if (!W_ERROR_IS_OK(result)) {
+ DEBUG(10, ("regdb_transaction_commit failed: %s\n",
+ win_errstr(result)));
+ }
+ } else {
+ result = regdb_transaction_cancel();
+ if (!W_ERROR_IS_OK(result)) {
+ DEBUG(10, ("regdb_transaction_cancel failed: %s\n",
+ win_errstr(result)));
+ }
+ }
+ regdb_close();
return ok;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list