mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
registry: create and use shared libcli/registry/util_reg.h header.
Guenther
This commit is contained in:
parent
49ccae1c20
commit
0a250f4946
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
#include "../librpc/gen_ndr/ndr_misc.h"
|
#include "../librpc/gen_ndr/ndr_misc.h"
|
||||||
|
#include "../libcli/registry/util_reg.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
|
32
libcli/registry/util_reg.h
Normal file
32
libcli/registry/util_reg.h
Normal file
@ -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__ */
|
@ -22,6 +22,7 @@
|
|||||||
#include "../libgpo/gpext/gpext.h"
|
#include "../libgpo/gpext/gpext.h"
|
||||||
#include "librpc/gen_ndr/ndr_misc.h"
|
#include "librpc/gen_ndr/ndr_misc.h"
|
||||||
#include "lib/util/dlinklist.h"
|
#include "lib/util/dlinklist.h"
|
||||||
|
#include "../libcli/registry/util_reg.h"
|
||||||
#if _SAMBA_BUILD_ == 3
|
#if _SAMBA_BUILD_ == 3
|
||||||
#include "libgpo/gpo_proto.h"
|
#include "libgpo/gpo_proto.h"
|
||||||
#include "registry.h"
|
#include "registry.h"
|
||||||
|
@ -1156,15 +1156,6 @@ NTSTATUS merge_nt_token(TALLOC_CTX *mem_ctx,
|
|||||||
struct security_token **token_out);
|
struct security_token **token_out);
|
||||||
bool token_sid_in_ace(const struct security_token *token, const struct security_ace *ace);
|
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 */
|
/* The following definitions come from lib/util_sec.c */
|
||||||
|
|
||||||
void sec_init(void);
|
void sec_init(void);
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include "registry/reg_init_smbconf.h"
|
#include "registry/reg_init_smbconf.h"
|
||||||
#include "lib/smbconf/smbconf_init.h"
|
#include "lib/smbconf/smbconf_init.h"
|
||||||
#include "lib/smbconf/smbconf_reg.h"
|
#include "lib/smbconf/smbconf_reg.h"
|
||||||
|
#include "../libcli/registry/util_reg.h"
|
||||||
|
|
||||||
#define INCLUDES_VALNAME "includes"
|
#define INCLUDES_VALNAME "includes"
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include "libgpo/gpo_proto.h"
|
#include "libgpo/gpo_proto.h"
|
||||||
#include "registry.h"
|
#include "registry.h"
|
||||||
#include "registry/reg_api.h"
|
#include "registry/reg_api.h"
|
||||||
|
#include "../libcli/registry/util_reg.h"
|
||||||
|
|
||||||
#define GP_EXT_NAME "scripts"
|
#define GP_EXT_NAME "scripts"
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include "registry/reg_api_util.h"
|
#include "registry/reg_api_util.h"
|
||||||
#include "registry/reg_init_basic.h"
|
#include "registry/reg_init_basic.h"
|
||||||
#include "../libcli/security/security.h"
|
#include "../libcli/security/security.h"
|
||||||
|
#include "../libcli/registry/util_reg.h"
|
||||||
|
|
||||||
|
|
||||||
/****************************************************************
|
/****************************************************************
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include "ads.h"
|
#include "ads.h"
|
||||||
#include "secrets.h"
|
#include "secrets.h"
|
||||||
#include "krb5_env.h"
|
#include "krb5_env.h"
|
||||||
|
#include "../libcli/registry/util_reg.h"
|
||||||
|
|
||||||
#ifdef HAVE_ADS
|
#ifdef HAVE_ADS
|
||||||
/*****************************************************************
|
/*****************************************************************
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include "registry.h"
|
#include "registry.h"
|
||||||
#include "reg_objects.h"
|
#include "reg_objects.h"
|
||||||
#include "dbwrap.h"
|
#include "dbwrap.h"
|
||||||
|
#include "../libcli/registry/util_reg.h"
|
||||||
|
|
||||||
#undef DBGC_CLASS
|
#undef DBGC_CLASS
|
||||||
#define DBGC_CLASS DBGC_REGISTRY
|
#define DBGC_CLASS DBGC_REGISTRY
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include "../librpc/gen_ndr/perfcount.h"
|
#include "../librpc/gen_ndr/perfcount.h"
|
||||||
#include "registry.h"
|
#include "registry.h"
|
||||||
#include "reg_perfcount.h"
|
#include "reg_perfcount.h"
|
||||||
|
#include "../libcli/registry/util_reg.h"
|
||||||
|
|
||||||
#undef DBGC_CLASS
|
#undef DBGC_CLASS
|
||||||
#define DBGC_CLASS DBGC_REGISTRY
|
#define DBGC_CLASS DBGC_REGISTRY
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include "../librpc/gen_ndr/ndr_winreg_c.h"
|
#include "../librpc/gen_ndr/ndr_winreg_c.h"
|
||||||
#include "../librpc/gen_ndr/ndr_security.h"
|
#include "../librpc/gen_ndr/ndr_security.h"
|
||||||
#include "rpc_client/cli_winreg.h"
|
#include "rpc_client/cli_winreg.h"
|
||||||
|
#include "../libcli/registry/util_reg.h"
|
||||||
|
|
||||||
NTSTATUS dcerpc_winreg_query_dword(TALLOC_CTX *mem_ctx,
|
NTSTATUS dcerpc_winreg_query_dword(TALLOC_CTX *mem_ctx,
|
||||||
struct dcerpc_binding_handle *h,
|
struct dcerpc_binding_handle *h,
|
||||||
|
@ -42,6 +42,7 @@
|
|||||||
#include "lib/crypto/arcfour.h"
|
#include "lib/crypto/arcfour.h"
|
||||||
#include "lib/crypto/md4.h"
|
#include "lib/crypto/md4.h"
|
||||||
#include "nsswitch/libwbclient/wbclient.h"
|
#include "nsswitch/libwbclient/wbclient.h"
|
||||||
|
#include "../libcli/registry/util_reg.h"
|
||||||
|
|
||||||
extern userdom_struct current_user_info;
|
extern userdom_struct current_user_info;
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
#include "../librpc/gen_ndr/srv_ntsvcs.h"
|
#include "../librpc/gen_ndr/srv_ntsvcs.h"
|
||||||
#include "services/svc_winreg_glue.h"
|
#include "services/svc_winreg_glue.h"
|
||||||
|
#include "../libcli/registry/util_reg.h"
|
||||||
|
|
||||||
#undef DBGC_CLASS
|
#undef DBGC_CLASS
|
||||||
#define DBGC_CLASS DBGC_RPC_SRV
|
#define DBGC_CLASS DBGC_RPC_SRV
|
||||||
|
@ -45,6 +45,7 @@
|
|||||||
#include "rpc_misc.h"
|
#include "rpc_misc.h"
|
||||||
#include "printing/notify.h"
|
#include "printing/notify.h"
|
||||||
#include "serverid.h"
|
#include "serverid.h"
|
||||||
|
#include "../libcli/registry/util_reg.h"
|
||||||
|
|
||||||
/* macros stolen from s4 spoolss server */
|
/* macros stolen from s4 spoolss server */
|
||||||
#define SPOOLSS_BUFFER_UNION(fn,info,level) \
|
#define SPOOLSS_BUFFER_UNION(fn,info,level) \
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#include "rpc_server/rpc_ncacn_np.h"
|
#include "rpc_server/rpc_ncacn_np.h"
|
||||||
#include "../libcli/security/security.h"
|
#include "../libcli/security/security.h"
|
||||||
#include "rpc_client/cli_winreg.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_KEY "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Print"
|
||||||
#define TOP_LEVEL_PRINT_PRINTERS_KEY TOP_LEVEL_PRINT_KEY "\\Printers"
|
#define TOP_LEVEL_PRINT_PRINTERS_KEY TOP_LEVEL_PRINT_KEY "\\Printers"
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#include "nt_printing.h"
|
#include "nt_printing.h"
|
||||||
#include "../libcli/security/display_sec.h"
|
#include "../libcli/security/display_sec.h"
|
||||||
#include "../libcli/security/security_descriptor.h"
|
#include "../libcli/security/security_descriptor.h"
|
||||||
|
#include "../libcli/registry/util_reg.h"
|
||||||
|
|
||||||
#define RPCCLIENT_PRINTERNAME(_printername, _cli, _arg) \
|
#define RPCCLIENT_PRINTERNAME(_printername, _cli, _arg) \
|
||||||
{ \
|
{ \
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include "registry.h"
|
#include "registry.h"
|
||||||
#include "registry/reg_backend_db.h"
|
#include "registry/reg_backend_db.h"
|
||||||
#include "registry/reg_objects.h"
|
#include "registry/reg_objects.h"
|
||||||
|
#include "../libcli/registry/util_reg.h"
|
||||||
|
|
||||||
extern int optind;
|
extern int optind;
|
||||||
extern char *optarg;
|
extern char *optarg;
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include "../libcli/security/display_sec.h"
|
#include "../libcli/security/display_sec.h"
|
||||||
#include "../libcli/security/sddl.h"
|
#include "../libcli/security/sddl.h"
|
||||||
|
#include "../libcli/registry/util_reg.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include "registry.h"
|
#include "registry.h"
|
||||||
#include "utils/net_registry_util.h"
|
#include "utils/net_registry_util.h"
|
||||||
#include "utils/net.h"
|
#include "utils/net.h"
|
||||||
|
#include "../libcli/registry/util_reg.h"
|
||||||
|
|
||||||
void print_registry_key(const char *keyname, NTTIME *modtime)
|
void print_registry_key(const char *keyname, NTTIME *modtime)
|
||||||
{
|
{
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include "nt_printing.h"
|
#include "nt_printing.h"
|
||||||
#include "registry/reg_objects.h"
|
#include "registry/reg_objects.h"
|
||||||
#include "../libcli/security/security.h"
|
#include "../libcli/security/security.h"
|
||||||
|
#include "../libcli/registry/util_reg.h"
|
||||||
|
|
||||||
/* support itanium as well */
|
/* support itanium as well */
|
||||||
static const struct print_architecture_table_node archi_table[]= {
|
static const struct print_architecture_table_node archi_table[]= {
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#include "registry/reg_import.h"
|
#include "registry/reg_import.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include "../libcli/security/display_sec.h"
|
#include "../libcli/security/display_sec.h"
|
||||||
|
#include "../libcli/registry/util_reg.h"
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************
|
/*******************************************************************
|
||||||
|
Loading…
Reference in New Issue
Block a user