registry: create and use shared libcli/registry/util_reg.h header.
authorGünther Deschner <gd@samba.org>
Fri, 25 Feb 2011 23:28:15 +0000 (00:28 +0100)
committerGünther Deschner <gd@samba.org>
Tue, 29 Mar 2011 23:13:07 +0000 (01:13 +0200)
Guenther

21 files changed:
libcli/registry/util_reg.c
libcli/registry/util_reg.h [new file with mode: 0644]
libgpo/gpext/gpext.c
source3/include/proto.h
source3/lib/smbconf/smbconf_reg.c
source3/libgpo/gpext/scripts.c
source3/libgpo/gpo_reg.c
source3/printing/nt_printing_ads.c
source3/registry/reg_objects.c
source3/registry/reg_perfcount.c
source3/rpc_client/cli_winreg.c
source3/rpc_server/netlogon/srv_netlog_nt.c
source3/rpc_server/ntsvcs/srv_ntsvcs_nt.c
source3/rpc_server/spoolss/srv_spoolss_nt.c
source3/rpc_server/spoolss/srv_spoolss_util.c
source3/rpcclient/cmd_spoolss.c
source3/utils/eventlogadm.c
source3/utils/net_registry.c
source3/utils/net_registry_util.c
source3/utils/net_rpc_printer.c
source3/utils/net_rpc_registry.c

index 3a1168f615175789604402ab9d99f94120ffbe30..3139fc34608b90d22315836411cd80636c6095f6 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "includes.h"
 #include "../librpc/gen_ndr/ndr_misc.h"
+#include "../libcli/registry/util_reg.h"
 
 /**
  * @file
diff --git a/libcli/registry/util_reg.h b/libcli/registry/util_reg.h
new file mode 100644 (file)
index 0000000..0250b45
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * Registry helper routines
+ * Copyright (C) Volker Lendecke 2006
+ * Copyright (C) Guenther Deschner 2009
+ * Copyright (C) Jelmer Vernooij 2003-2007
+ *
+ * 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/>.
+ */
+
+#ifndef __LIBCLI_REGISTRY_UTIL_REG_H__
+#define __LIBCLI_REGISTRY_UTIL_REG_H__
+
+const char *str_regtype(int type);
+int regtype_by_string(const char *str);
+bool push_reg_sz(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, const char *s);
+bool push_reg_multi_sz(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, const char **a);
+bool pull_reg_sz(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, const char **s);
+bool pull_reg_multi_sz(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, const char ***a);
+
+#endif /* __LIBCLI_REGISTRY_UTIL_REG_H__ */
index 8c70f65221b97fa17148ae025192e3bbf29cd74f..080bf0745231150a4a0ca9d8081f416318c676e1 100644 (file)
@@ -22,6 +22,7 @@
 #include "../libgpo/gpext/gpext.h"
 #include "librpc/gen_ndr/ndr_misc.h"
 #include "lib/util/dlinklist.h"
+#include "../libcli/registry/util_reg.h"
 #if _SAMBA_BUILD_ == 3
 #include "libgpo/gpo_proto.h"
 #include "registry.h"
index b1138234e0722b779c5020d837aeb8bedb962e34..307853f50ea4e380f6ad3a7d9a45e9bc5cfcebdc 100644 (file)
@@ -1156,15 +1156,6 @@ NTSTATUS merge_nt_token(TALLOC_CTX *mem_ctx,
                        struct security_token **token_out);
 bool token_sid_in_ace(const struct security_token *token, const struct security_ace *ace);
 
-/* The following definitions come from ..libcli/registry/util_reg.c  */
-
-const char *str_regtype(int type);
-int regtype_by_string(const char *str);
-bool push_reg_sz(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, const char *s);
-bool push_reg_multi_sz(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, const char **a);
-bool pull_reg_sz(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, const char **s);
-bool pull_reg_multi_sz(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, const char ***a);
-
 /* The following definitions come from lib/util_sec.c  */
 
 void sec_init(void);
index 980c5b7e03d75183e18dbaa343682420f2ed64f6..adac233732206e6a9a9608cbcb8a338a4c4299e5 100644 (file)
@@ -27,6 +27,7 @@
 #include "registry/reg_init_smbconf.h"
 #include "lib/smbconf/smbconf_init.h"
 #include "lib/smbconf/smbconf_reg.h"
+#include "../libcli/registry/util_reg.h"
 
 #define INCLUDES_VALNAME "includes"
 
index 09dc3de492ef11cb2890bf83f4fc332dd20dba7f..3e977378ee499e142795229eecf7aa75c875e6a7 100644 (file)
@@ -23,6 +23,7 @@
 #include "libgpo/gpo_proto.h"
 #include "registry.h"
 #include "registry/reg_api.h"
+#include "../libcli/registry/util_reg.h"
 
 #define GP_EXT_NAME "scripts"
 
index 45bef570b2b47e7e4425ff50906dbb4a1fb74cd0..d9fcd43cafc059cb951f6a7c80e425b2c268daf7 100644 (file)
@@ -26,6 +26,7 @@
 #include "registry/reg_api_util.h"
 #include "registry/reg_init_basic.h"
 #include "../libcli/security/security.h"
+#include "../libcli/registry/util_reg.h"
 
 
 /****************************************************************
index 70057ffad3d653a3e7c938b4b571987301b26a6a..56e68439ed2fde0ff634bd2d200eaaa28e0d25aa 100644 (file)
@@ -26,6 +26,7 @@
 #include "ads.h"
 #include "secrets.h"
 #include "krb5_env.h"
+#include "../libcli/registry/util_reg.h"
 
 #ifdef HAVE_ADS
 /*****************************************************************
index eb3437286a65ab46cfa2d2a364db90c66d4e275a..0fab3f7d8bead7dcaa95da3c3550a8224c596342 100644 (file)
@@ -24,6 +24,7 @@
 #include "registry.h"
 #include "reg_objects.h"
 #include "dbwrap.h"
+#include "../libcli/registry/util_reg.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
index 136f67fd8fbcb8cc9f613782305f58cc744cc706..4ed3305c15882d62a840c717d995d2e77e208451 100644 (file)
@@ -24,6 +24,7 @@
 #include "../librpc/gen_ndr/perfcount.h"
 #include "registry.h"
 #include "reg_perfcount.h"
+#include "../libcli/registry/util_reg.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
index 67f85738642d77d41192ef8bbc63336c29933336..2517dbc50ab9c7d270810c7ee7bddd41a0702c71 100644 (file)
@@ -23,6 +23,7 @@
 #include "../librpc/gen_ndr/ndr_winreg_c.h"
 #include "../librpc/gen_ndr/ndr_security.h"
 #include "rpc_client/cli_winreg.h"
+#include "../libcli/registry/util_reg.h"
 
 NTSTATUS dcerpc_winreg_query_dword(TALLOC_CTX *mem_ctx,
                                   struct dcerpc_binding_handle *h,
index 478958c62191af467b81ad1c6aeabab137782c9d..6fe92eb17256707ff746e068a43de74dab414a8a 100644 (file)
@@ -42,6 +42,7 @@
 #include "lib/crypto/arcfour.h"
 #include "lib/crypto/md4.h"
 #include "nsswitch/libwbclient/wbclient.h"
+#include "../libcli/registry/util_reg.h"
 
 extern userdom_struct current_user_info;
 
index 87b267da26661c1b84aa11428ca6f7d86482f2c5..57f642a0fe451daaebdf4aa2d37d86c205579f25 100644 (file)
@@ -22,6 +22,7 @@
 #include "includes.h"
 #include "../librpc/gen_ndr/srv_ntsvcs.h"
 #include "services/svc_winreg_glue.h"
+#include "../libcli/registry/util_reg.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_RPC_SRV
index d95bd54aecafd86710aeac3259ffcb9294aae226..56a27134421c96061049ba3a6735ea0859322a4e 100644 (file)
@@ -45,6 +45,7 @@
 #include "rpc_misc.h"
 #include "printing/notify.h"
 #include "serverid.h"
+#include "../libcli/registry/util_reg.h"
 
 /* macros stolen from s4 spoolss server */
 #define SPOOLSS_BUFFER_UNION(fn,info,level) \
index c49d610555a7ef0176431a45952669f921ca9f2d..9e9e253dd718166c433bc3643095bd305ac32432 100644 (file)
@@ -30,6 +30,7 @@
 #include "rpc_server/rpc_ncacn_np.h"
 #include "../libcli/security/security.h"
 #include "rpc_client/cli_winreg.h"
+#include "../libcli/registry/util_reg.h"
 
 #define TOP_LEVEL_PRINT_KEY "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Print"
 #define TOP_LEVEL_PRINT_PRINTERS_KEY TOP_LEVEL_PRINT_KEY "\\Printers"
index a246d27fe26ee781cfc0c4e35d8d7558e32971d7..43d95db8f4d6d143d1e084a957f6831fa19a5c60 100644 (file)
@@ -33,6 +33,7 @@
 #include "nt_printing.h"
 #include "../libcli/security/display_sec.h"
 #include "../libcli/security/security_descriptor.h"
+#include "../libcli/registry/util_reg.h"
 
 #define RPCCLIENT_PRINTERNAME(_printername, _cli, _arg) \
 { \
index fc69332d315956e79c3a51918d8c7ac2fe6fefda..9ddd9c7df84648b9397a216907228aa36c453360 100644 (file)
@@ -27,6 +27,7 @@
 #include "registry.h"
 #include "registry/reg_backend_db.h"
 #include "registry/reg_objects.h"
+#include "../libcli/registry/util_reg.h"
 
 extern int optind;
 extern char *optarg;
index 84891aa0be895cb6ca1da67dfcf9f7d1d25b98a2..7050b230226c598f41e4b60499f31221bbad03a3 100644 (file)
@@ -33,6 +33,7 @@
 #include <assert.h>
 #include "../libcli/security/display_sec.h"
 #include "../libcli/security/sddl.h"
+#include "../libcli/registry/util_reg.h"
 
 /*
  *
index 7cbf238aeb95236c3fa41d1a682f5a8155dc14c3..084378f79206f3b7a9e9cce8ae66583fc7e23373 100644 (file)
@@ -23,6 +23,7 @@
 #include "registry.h"
 #include "utils/net_registry_util.h"
 #include "utils/net.h"
+#include "../libcli/registry/util_reg.h"
 
 void print_registry_key(const char *keyname, NTTIME *modtime)
 {
index 0e63d189470c1233719637893d54c3f9d4d3a644..20e5f52f62b5b12718be3cd24e33cf4d93e0d8ca 100644 (file)
@@ -25,6 +25,7 @@
 #include "nt_printing.h"
 #include "registry/reg_objects.h"
 #include "../libcli/security/security.h"
+#include "../libcli/registry/util_reg.h"
 
 /* support itanium as well */
 static const struct print_architecture_table_node archi_table[]= {
index 5ccd166945059272ab48f53ef158e5874b4eca15..190ab05819c9699e210a638b202c740dc7558606 100644 (file)
@@ -29,6 +29,7 @@
 #include "registry/reg_import.h"
 #include <assert.h>
 #include "../libcli/security/display_sec.h"
+#include "../libcli/registry/util_reg.h"
 
 
 /*******************************************************************