[SCM] Samba Shared Repository - branch v3-2-test updated -
initial-v3-2-test-1502-ge8a0524
Michael Adam
obnox at samba.org
Fri Jan 18 08:46:25 GMT 2008
The branch, v3-2-test has been updated
via e8a0524961d81fa83e0316905dc9d215e4aa7656 (commit)
via d7a8d7ffbd724a59aa3fc4bdeca6be5d5a0e7258 (commit)
from 645f2376d40fabdc787902ac7506ad7234616619 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit e8a0524961d81fa83e0316905dc9d215e4aa7656
Author: Michael Adam <obnox at samba.org>
Date: Fri Jan 18 09:40:42 2008 +0100
Add a registry backend netlogon_params that replaces the former dynamic overlay.
This is the first step in replacing the dynamic overlays by proper
backends implementing REGISTRY_OPS.
Michael
commit d7a8d7ffbd724a59aa3fc4bdeca6be5d5a0e7258
Author: Michael Adam <obnox at samba.org>
Date: Fri Jan 18 08:15:27 2008 +0100
Fix typo in debug message.
Michael
-----------------------------------------------------------------------
Summary of changes:
source/Makefile.in | 1 +
source/include/reg_objects.h | 1 +
source/registry/reg_api.c | 2 +-
source/registry/reg_backend_netlogon_params.c | 58 +++++++++++++++++++++++++
source/registry/reg_dynamic.c | 4 ++
source/registry/reg_frontend.c | 2 +
6 files changed, 67 insertions(+), 1 deletions(-)
create mode 100644 source/registry/reg_backend_netlogon_params.c
Changeset truncated at 500 lines:
diff --git a/source/Makefile.in b/source/Makefile.in
index 2276500..45aa4cb 100644
--- a/source/Makefile.in
+++ b/source/Makefile.in
@@ -417,6 +417,7 @@ REGISTRY_OBJ = registry/reg_frontend.o registry/reg_cachehook.o registry/reg_pri
registry/reg_util.o registry/reg_dynamic.o registry/reg_perfcount.o \
registry/reg_smbconf.o registry/reg_api.o \
registry/reg_frontend_hilvl.o \
+ registry/reg_backend_netlogon_params.o \
$(UTIL_REG_API_OBJ) $(UTIL_REG_SMBCONF_OBJ)
RPC_LSA_OBJ = rpc_server/srv_lsa.o rpc_server/srv_lsa_nt.o librpc/gen_ndr/srv_lsa.o
diff --git a/source/include/reg_objects.h b/source/include/reg_objects.h
index 23a14e6..3b846db 100644
--- a/source/include/reg_objects.h
+++ b/source/include/reg_objects.h
@@ -100,6 +100,7 @@ typedef struct {
#define KEY_EVENTLOG "HKLM\\SYSTEM\\CurrentControlSet\\Services\\Eventlog"
#define KEY_SHARES "HKLM\\SYSTEM\\CurrentControlSet\\Services\\LanmanServer\\Shares"
#define KEY_SMBCONF "HKLM\\SOFTWARE\\Samba\\smbconf"
+#define KEY_NETLOGON_PARAMS "HKLM\\SYSTEM\\CurrentControlSet\\Services\\Netlogon\\Parameters"
#define KEY_TREE_ROOT ""
/*
diff --git a/source/registry/reg_api.c b/source/registry/reg_api.c
index 18435ff..788af28 100644
--- a/source/registry/reg_api.c
+++ b/source/registry/reg_api.c
@@ -183,7 +183,7 @@ static WERROR regkey_open_onelevel(TALLOC_CTX *mem_ctx,
/* Look up the table of registry I/O operations */
if ( !(key->hook = reghook_cache_find( key->name )) ) {
- DEBUG(0,("reg_open_onelevel: Failed to assigned a "
+ DEBUG(0,("reg_open_onelevel: Failed to assign a "
"REGISTRY_HOOK to [%s]\n", key->name ));
result = WERR_BADFILE;
goto done;
diff --git a/source/registry/reg_backend_netlogon_params.c b/source/registry/reg_backend_netlogon_params.c
new file mode 100644
index 0000000..b70e1bd
--- /dev/null
+++ b/source/registry/reg_backend_netlogon_params.c
@@ -0,0 +1,58 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * Virtual Windows Registry Layer
+ * Copyright (C) Gerald Carter 2002-2005
+ * Copyright (C) Michael Adam 2008
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * Netlogon parameters registry backend.
+ *
+ * This replaces the former dynamic netlogon parameters overlay.
+ */
+
+#include "includes.h"
+
+#undef DBGC_CLASS
+#define DBGC_CLASS DBGC_REGISTRY
+
+
+static int netlogon_params_fetch_reg_values(const char *key,
+ REGVAL_CTR *regvals)
+{
+ uint32 dwValue;
+
+ if ( !pdb_get_account_policy(AP_REFUSE_MACHINE_PW_CHANGE, &dwValue) )
+ dwValue = 0;
+
+ regval_ctr_addvalue( regvals, "RefusePasswordChange", REG_DWORD,
+ (char*)&dwValue, sizeof(dwValue) );
+
+ return regval_ctr_numvals( regvals );
+}
+
+
+REGISTRY_OPS netlogon_params_reg_ops = {
+ NULL,
+ netlogon_params_fetch_reg_values,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL
+};
diff --git a/source/registry/reg_dynamic.c b/source/registry/reg_dynamic.c
index e70bd17..07c9673 100644
--- a/source/registry/reg_dynamic.c
+++ b/source/registry/reg_dynamic.c
@@ -29,6 +29,7 @@ struct reg_dyn_values {
int (*fetch_values) ( REGVAL_CTR *val );
};
+#if 0
/***********************************************************************
***********************************************************************/
@@ -44,6 +45,7 @@ static int netlogon_params( REGVAL_CTR *regvals )
return regval_ctr_numvals( regvals );
}
+#endif
/***********************************************************************
***********************************************************************/
@@ -200,7 +202,9 @@ static int current_version( REGVAL_CTR *values )
***********************************************************************/
static struct reg_dyn_values dynamic_values[] = {
+#if 0
{ "HKLM/SYSTEM/CURRENTCONTROLSET/SERVICES/NETLOGON/PARAMETERS", &netlogon_params },
+#endif
{ "HKLM/SYSTEM/CURRENTCONTROLSET/CONTROL/PRODUCTOPTIONS", &prod_options },
{ "HKLM/SYSTEM/CURRENTCONTROLSET/SERVICES/TCPIP/PARAMETERS", &tcpip_params },
{ "HKLM/SOFTWARE/MICROSOFT/WINDOWS NT/CURRENTVERSION/PERFLIB", &perflib_params },
diff --git a/source/registry/reg_frontend.c b/source/registry/reg_frontend.c
index 9e84d3a..6674b0b 100644
--- a/source/registry/reg_frontend.c
+++ b/source/registry/reg_frontend.c
@@ -28,6 +28,7 @@ extern REGISTRY_OPS printing_ops;
extern REGISTRY_OPS eventlog_ops;
extern REGISTRY_OPS shares_reg_ops;
extern REGISTRY_OPS smbconf_reg_ops;
+extern REGISTRY_OPS netlogon_params_reg_ops;
extern REGISTRY_OPS regdb_ops; /* these are the default */
/* array of REGISTRY_HOOK's which are read into a tree for easy access */
@@ -40,6 +41,7 @@ REGISTRY_HOOK reg_hooks[] = {
{ KEY_PRINTING_PORTS, &printing_ops },
{ KEY_SHARES, &shares_reg_ops },
{ KEY_SMBCONF, &smbconf_reg_ops },
+ { KEY_NETLOGON_PARAMS, &netlogon_params_reg_ops },
#endif
{ NULL, NULL }
};
--
Samba Shared Repository
More information about the samba-cvs
mailing list