1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-04 08:22:08 +03:00

r26003: Split up DB_WRAP, as first step in an attempt to sanitize dependencies.

(This used to be commit 56dfcb4f2f)
This commit is contained in:
Jelmer Vernooij
2007-11-16 20:12:00 +01:00
committed by Stefan Metzmacher
parent b7c5d2b0c9
commit ca0b72a1fd
62 changed files with 308 additions and 167 deletions

View File

@ -22,7 +22,8 @@
#include "includes.h"
#include "librpc/gen_ndr/ndr_netlogon.h"
#include "system/time.h"
#include "db_wrap.h"
#include "tdb_wrap.h"
#include "util/util_ldb.h"
#include "lib/ldb/include/ldb.h"
#include "auth/auth.h"
#include "auth/auth_sam.h"

View File

@ -7,7 +7,7 @@ include credentials/config.mk
[SUBSYSTEM::auth_sam]
PRIVATE_PROTO_HEADER = auth_sam.h
OBJ_FILES = sam.o auth_sam_reply.o ntlm_check.o
PUBLIC_DEPENDENCIES = SAMDB
PUBLIC_DEPENDENCIES = SAMDB UTIL_LDB
#######################
# Start MODULE auth_sam

View File

@ -26,7 +26,7 @@
#include "librpc/gen_ndr/samr.h" /* for struct samrPassword */
#include "param/secrets.h"
#include "system/filesys.h"
#include "db_wrap.h"
#include "util/util_ldb.h"
#include "auth/credentials/credentials.h"
#include "auth/credentials/credentials_krb5.h"
#include "param/param.h"

View File

@ -23,7 +23,8 @@
#include "lib/ldb/include/ldb.h"
#include "lib/ldb/include/ldb_errors.h"
#include "dsdb/samdb/samdb.h"
#include "db_wrap.h"
#include "ldb_wrap.h"
#include "util/util_ldb.h"
#include "libcli/auth/libcli_auth.h"
#include "auth/auth.h"
#include "param/param.h"

View File

@ -22,7 +22,8 @@
#include "includes.h"
#include "system/time.h"
#include "auth/auth.h"
#include "db_wrap.h"
#include <ldb.h>
#include "util/util_ldb.h"
#include "dsdb/samdb/samdb.h"
#include "libcli/security/security.h"
#include "libcli/ldap/ldap.h"

View File

@ -31,7 +31,7 @@
#include "lib/ldb/include/ldb.h"
#include "lib/ldb/include/ldb_errors.h"
#include "dsdb/samdb/samdb.h"
#include "db_wrap.h"
#include "ldb_wrap.h"
#include "auth/auth.h"
#include "param/param.h"

View File

@ -30,7 +30,7 @@
#include "librpc/gen_ndr/ndr_misc.h"
#include "dsdb/samdb/samdb.h"
#include "auth/auth.h"
#include "db_wrap.h"
#include "ldb_wrap.h"
#include "system/network.h"
#include "lib/socket/netif.h"
#include "param/param.h"

View File

@ -30,7 +30,7 @@
#include "librpc/gen_ndr/ndr_misc.h"
#include "dsdb/samdb/samdb.h"
#include "auth/auth.h"
#include "db_wrap.h"
#include "ldb_wrap.h"
#include "system/network.h"
#include "lib/socket/netif.h"

View File

@ -23,7 +23,6 @@
#include "system/filesys.h"
#include "lib/tdb/include/tdb.h"
#include "messaging/messaging.h"
#include "db_wrap.h"
#include "lib/messaging/irpc.h"
#include "libcli/libcli.h"
#include "cluster/cluster.h"

View File

@ -19,7 +19,7 @@
*/
#include "includes.h"
#include "db_wrap.h"
#include "tdb_wrap.h"
#include "lib/tdb/include/tdb.h"
#include "lib/util/dlinklist.h"
#include "lib/events/events.h"

View File

@ -23,7 +23,7 @@
#include "system/network.h"
#include "system/filesys.h"
#include "../include/ctdb_private.h"
#include "db_wrap.h"
#include "tdb_wrap.h"
#include "lib/util/dlinklist.h"
/*

View File

@ -26,7 +26,7 @@
#include "cluster/cluster_private.h"
#include "lib/tdb/include/tdb.h"
#include "include/ctdb.h"
#include "db_wrap.h"
#include "tdb_wrap.h"
#include "lib/util/dlinklist.h"
#include "param/param.h"
#include "librpc/gen_ndr/misc.h"

View File

@ -42,7 +42,7 @@
#include "system/filesys.h"
#include "lib/tdb/include/tdb.h"
#include "messaging/messaging.h"
#include "db_wrap.h"
#include "tdb_wrap.h"
#include "lib/messaging/irpc.h"
#include "librpc/gen_ndr/ndr_opendb.h"
#include "ntvfs/ntvfs.h"

View File

@ -23,7 +23,7 @@
#include "cluster/cluster.h"
#include "cluster/cluster_private.h"
#include "lib/tdb/include/tdb.h"
#include "db_wrap.h"
#include "tdb_wrap.h"
#include "system/filesys.h"
#include "param/param.h"
#include "librpc/gen_ndr/misc.h"

View File

@ -25,7 +25,7 @@
#include "dsdb/samdb/samdb.h"
#include "auth/auth.h"
#include "libcli/ldap/ldap.h"
#include "db_wrap.h"
#include "util/util_ldb.h"
#include "libcli/security/security.h"
/*

View File

@ -31,7 +31,7 @@
#include "libcli/security/security.h"
#include "librpc/gen_ndr/ndr_misc.h"
#include "auth/auth.h"
#include "db_wrap.h"
#include "util/util_ldb.h"
#include "dsdb/samdb/samdb.h"
static WERROR DsCrackNameOneFilter(struct ldb_context *sam_ctx, TALLOC_CTX *mem_ctx,

View File

@ -39,7 +39,7 @@
#include "dsdb/samdb/samdb.h"
#include "libcli/security/security.h"
#include "librpc/gen_ndr/ndr_security.h"
#include "db_wrap.h"
#include "util/util_ldb.h"
int samldb_notice_sid(struct ldb_module *module,
TALLOC_CTX *mem_ctx, const struct dom_sid *sid);

View File

@ -32,7 +32,8 @@
#include "libcli/ldap/ldap.h"
#include "system/time.h"
#include "system/filesys.h"
#include "db_wrap.h"
#include "ldb_wrap.h"
#include "util/util_ldb.h"
#include "dsdb/samdb/samdb.h"
#include "dsdb/common/flags.h"
#include "param/param.h"

View File

@ -24,7 +24,7 @@
#include "dsdb/samdb/samdb.h"
#include "auth/auth.h"
#include "libcli/security/security.h"
#include "db_wrap.h"
#include "util/util_ldb.h"
/*
add privilege bits for one sid to a security_token

View File

@ -44,7 +44,7 @@
#include "auth/auth.h"
#include "auth/credentials/credentials.h"
#include "auth/auth_sam.h"
#include "db_wrap.h"
#include "util/util_ldb.h"
#include "dsdb/samdb/samdb.h"
#include "librpc/ndr/libndr.h"
#include "librpc/gen_ndr/ndr_drsblobs.h"

View File

@ -23,7 +23,7 @@
#include "libcli/ldap/ldap.h"
#include "lib/ldb/include/ldb.h"
#include "lib/ldb/include/ldb_errors.h"
#include "lib/db_wrap.h"
#include "lib/ldb_wrap.h"
#include "auth/credentials/credentials.h"
#include "auth/gensec/gensec.h"
#include "param/param.h"

View File

@ -29,9 +29,13 @@ OBJ_FILES = compression/mszip.o
PRIVATE_PROTO_HEADER = gencache/gencache.h
OBJ_FILES = gencache/gencache.o \
[SUBSYSTEM::DB_WRAP]
PUBLIC_PROTO_HEADER = db_wrap_proto.h
PUBLIC_HEADERS = db_wrap.h
OBJ_FILES = db_wrap.o gendb.o
PUBLIC_DEPENDENCIES = LIBTDB LIBLDB
[SUBSYSTEM::LDB_WRAP]
PUBLIC_HEADERS = ldb_wrap.h
OBJ_FILES = ldb_wrap.o
PUBLIC_DEPENDENCIES = LIBLDB
PRIVATE_DEPENDENCIES = LDBSAMBA
[SUBSYSTEM::TDB_WRAP]
PUBLIC_HEADERS = tdb_wrap.h
OBJ_FILES = tdb_wrap.o
PUBLIC_DEPENDENCIES = LIBTDB

View File

@ -24,7 +24,7 @@
#include "lib/tdb/include/tdb.h"
#include "lib/dbwrap/dbwrap.h"
#include "system/filesys.h"
#include "db_wrap.h"
#include "tdb_wrap.h"
#include "param/param.h"
struct db_tdb_ctx {

View File

@ -30,7 +30,7 @@
#include "lib/ldb-samba/ldif_handlers.h"
#include "auth/gensec/gensec.h"
#include "auth/auth.h"
#include "db_wrap.h"
#include "ldb_wrap.h"
#endif

View File

@ -1,7 +1,7 @@
/*
Unix SMB/CIFS implementation.
database wrap functions
LDB wrap functions
Copyright (C) Andrew Tridgell 2004
@ -27,18 +27,15 @@
*/
#include "includes.h"
#include "lib/util/dlinklist.h"
#include "lib/events/events.h"
#include "lib/tdb/include/tdb.h"
#include "lib/ldb/include/ldb.h"
#include "lib/ldb/include/ldb_errors.h"
#include "lib/ldb-samba/ldif_handlers.h"
#include "db_wrap.h"
#include "ldb_wrap.h"
#include "dsdb/samdb/samdb.h"
#include "dsdb/schema/proto.h"
#include "param/param.h"
static struct tdb_wrap *tdb_list;
/*
this is used to catch debug messages from ldb
*/
@ -71,11 +68,6 @@ static void ldb_wrap_debug(void *context, enum ldb_debug_level level,
free(s);
}
char *wrap_casefold(void *context, void *mem_ctx, const char *s)
{
return strupper_talloc(mem_ctx, s);
}
/* check for memory leaks on the ldb context */
static int ldb_wrap_destructor(struct ldb_context *ldb)
{
@ -192,91 +184,4 @@ struct ldb_context *ldb_wrap_connect(TALLOC_CTX *mem_ctx,
}
/*
Log tdb messages via DEBUG().
*/
static void tdb_wrap_log(TDB_CONTEXT *tdb, enum tdb_debug_level level,
const char *format, ...) PRINTF_ATTRIBUTE(3,4);
static void tdb_wrap_log(TDB_CONTEXT *tdb, enum tdb_debug_level level,
const char *format, ...)
{
va_list ap;
char *ptr = NULL;
int debug_level;
va_start(ap, format);
vasprintf(&ptr, format, ap);
va_end(ap);
switch (level) {
case TDB_DEBUG_FATAL:
debug_level = 0;
break;
case TDB_DEBUG_ERROR:
debug_level = 1;
break;
case TDB_DEBUG_WARNING:
debug_level = 2;
break;
case TDB_DEBUG_TRACE:
debug_level = 5;
break;
default:
debug_level = 0;
}
if (ptr != NULL) {
const char *name = tdb_name(tdb);
DEBUG(debug_level, ("tdb(%s): %s", name ? name : "unnamed", ptr));
free(ptr);
}
}
/* destroy the last connection to a tdb */
static int tdb_wrap_destructor(struct tdb_wrap *w)
{
tdb_close(w->tdb);
DLIST_REMOVE(tdb_list, w);
return 0;
}
/*
wrapped connection to a tdb database
to close just talloc_free() the tdb_wrap pointer
*/
struct tdb_wrap *tdb_wrap_open(TALLOC_CTX *mem_ctx,
const char *name, int hash_size, int tdb_flags,
int open_flags, mode_t mode)
{
struct tdb_wrap *w;
struct tdb_logging_context log_ctx;
log_ctx.log_fn = tdb_wrap_log;
for (w=tdb_list;w;w=w->next) {
if (strcmp(name, w->name) == 0) {
return talloc_reference(mem_ctx, w);
}
}
w = talloc(mem_ctx, struct tdb_wrap);
if (w == NULL) {
return NULL;
}
w->name = talloc_strdup(w, name);
w->tdb = tdb_open_ex(name, hash_size, tdb_flags,
open_flags, mode, &log_ctx, NULL);
if (w->tdb == NULL) {
talloc_free(w);
return NULL;
}
talloc_set_destructor(w, tdb_wrap_destructor);
DLIST_ADD(tdb_list, w);
return w;
}

41
source4/lib/ldb_wrap.h Normal file
View File

@ -0,0 +1,41 @@
/*
Unix SMB/CIFS implementation.
database wrap headers
Copyright (C) Andrew Tridgell 2004
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 _LDB_WRAP_H_
#define _LDB_WRAP_H_
struct auth_session_info;
struct ldb_message;
struct ldb_dn;
struct cli_credentials;
struct loadparm_context;
char *wrap_casefold(void *context, void *mem_ctx, const char *s);
struct ldb_context *ldb_wrap_connect(TALLOC_CTX *mem_ctx,
struct loadparm_context *lp_ctx,
const char *url,
struct auth_session_info *session_info,
struct cli_credentials *credentials,
unsigned int flags,
const char *options[]);
#endif /* _LDB_WRAP_H_ */

View File

@ -6,7 +6,7 @@ OBJ_FILES = \
messaging.o
PUBLIC_DEPENDENCIES = \
LIBSAMBA-UTIL \
DB_WRAP \
TDB_WRAP \
NDR_IRPC \
UNIX_PRIVS \
UTIL_TDB \

View File

@ -27,7 +27,7 @@
#include "lib/socket/socket.h"
#include "librpc/gen_ndr/ndr_irpc.h"
#include "lib/messaging/irpc.h"
#include "db_wrap.h"
#include "tdb_wrap.h"
#include "lib/util/unix_privs.h"
#include "librpc/rpc/dcerpc.h"
#include "lib/tdb/include/tdb.h"

View File

@ -21,7 +21,7 @@
#include "registry.h"
#include "lib/ldb/include/ldb.h"
#include "lib/ldb/include/ldb_errors.h"
#include "db_wrap.h"
#include "ldb_wrap.h"
#include "librpc/gen_ndr/winreg.h"
#include "param/param.h"

117
source4/lib/tdb_wrap.c Normal file
View File

@ -0,0 +1,117 @@
/*
Unix SMB/CIFS implementation.
TDB wrap functions
Copyright (C) Andrew Tridgell 2004
Copyright (C) Jelmer Vernooij <jelmer@samba.org> 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/>.
*/
#include "includes.h"
#include "lib/tdb/include/tdb.h"
#include "lib/util/dlinklist.h"
#include "tdb_wrap.h"
#include "tdb.h"
static struct tdb_wrap *tdb_list;
/* destroy the last connection to a tdb */
static int tdb_wrap_destructor(struct tdb_wrap *w)
{
tdb_close(w->tdb);
DLIST_REMOVE(tdb_list, w);
return 0;
}
/*
Log tdb messages via DEBUG().
*/
static void tdb_wrap_log(TDB_CONTEXT *tdb, enum tdb_debug_level level,
const char *format, ...) PRINTF_ATTRIBUTE(3,4);
static void tdb_wrap_log(TDB_CONTEXT *tdb, enum tdb_debug_level level,
const char *format, ...)
{
va_list ap;
char *ptr = NULL;
int debug_level;
va_start(ap, format);
vasprintf(&ptr, format, ap);
va_end(ap);
switch (level) {
case TDB_DEBUG_FATAL:
debug_level = 0;
break;
case TDB_DEBUG_ERROR:
debug_level = 1;
break;
case TDB_DEBUG_WARNING:
debug_level = 2;
break;
case TDB_DEBUG_TRACE:
debug_level = 5;
break;
default:
debug_level = 0;
}
if (ptr != NULL) {
const char *name = tdb_name(tdb);
DEBUG(debug_level, ("tdb(%s): %s", name ? name : "unnamed", ptr));
free(ptr);
}
}
/*
wrapped connection to a tdb database
to close just talloc_free() the tdb_wrap pointer
*/
struct tdb_wrap *tdb_wrap_open(TALLOC_CTX *mem_ctx,
const char *name, int hash_size, int tdb_flags,
int open_flags, mode_t mode)
{
struct tdb_wrap *w;
struct tdb_logging_context log_ctx;
log_ctx.log_fn = tdb_wrap_log;
for (w=tdb_list;w;w=w->next) {
if (strcmp(name, w->name) == 0) {
return talloc_reference(mem_ctx, w);
}
}
w = talloc(mem_ctx, struct tdb_wrap);
if (w == NULL) {
return NULL;
}
w->name = talloc_strdup(w, name);
w->tdb = tdb_open_ex(name, hash_size, tdb_flags,
open_flags, mode, &log_ctx, NULL);
if (w->tdb == NULL) {
talloc_free(w);
return NULL;
}
talloc_set_destructor(w, tdb_wrap_destructor);
DLIST_ADD(tdb_list, w);
return w;
}

View File

@ -19,6 +19,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _TDB_WRAP_H_
#define _TDB_WRAP_H_
#include "tdb.h"
struct tdb_wrap {
struct tdb_context *tdb;
@ -27,10 +31,8 @@ struct tdb_wrap {
struct tdb_wrap *next, *prev;
};
struct auth_session_info;
struct ldb_message;
struct ldb_dn;
struct cli_credentials;
struct loadparm_context;
struct tdb_wrap *tdb_wrap_open(TALLOC_CTX *mem_ctx,
const char *name, int hash_size, int tdb_flags,
int open_flags, mode_t mode);
#include "lib/db_wrap_proto.h"
#endif /* _TDB_WRAP_H_ */

View File

@ -49,12 +49,14 @@ PUBLIC_DEPENDENCIES = XATTR
# End SUBSYSTEM WRAP_XATTR
################################################
################################################
# Start SUBSYSTEM UTIL_TDB
[SUBSYSTEM::UTIL_TDB]
PUBLIC_PROTO_HEADER = util_tdb.h
OBJ_FILES = \
util_tdb.o
PUBLIC_DEPENDENCIES = LIBTDB
# End SUBSYSTEM UTIL_TDB
################################################
[SUBSYSTEM::UTIL_LDB]
PUBLIC_PROTO_HEADER = util_ldb.h
OBJ_FILES = \
util_ldb.o
PUBLIC_DEPENDENCIES = LIBLDB

View File

@ -23,7 +23,6 @@
#include "includes.h"
#include "lib/ldb/include/ldb.h"
#include "lib/ldb/include/ldb_errors.h"
#include "lib/db_wrap.h"
/*
search the sam for the specified attributes - va_list variant
@ -123,3 +122,10 @@ int gendb_add_ldif(struct ldb_context *ldb, const char *ldif_string)
talloc_free(ldif);
return ret;
}
char *wrap_casefold(void *context, void *mem_ctx, const char *s)
{
return strupper_talloc(mem_ctx, s);
}

View File

@ -0,0 +1,55 @@
#ifndef __LIB_UTIL_UTIL_LDB_H__
#define __LIB_UTIL_UTIL_LDB_H__
#undef _PRINTF_ATTRIBUTE
#define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2)
/* This file was automatically generated by mkproto.pl. DO NOT EDIT */
#ifndef _PUBLIC_
#define _PUBLIC_
#endif
#ifndef _PURE_
#define _PURE_
#endif
#ifndef _NORETURN_
#define _NORETURN_
#endif
#ifndef _DEPRECATED_
#define _DEPRECATED_
#endif
#ifndef _WARN_UNUSED_RESULT_
#define _WARN_UNUSED_RESULT_
#endif
/* The following definitions come from lib/util/util_ldb.c */
int gendb_search_v(struct ldb_context *ldb,
TALLOC_CTX *mem_ctx,
struct ldb_dn *basedn,
struct ldb_message ***msgs,
const char * const *attrs,
const char *format,
va_list ap) _PRINTF_ATTRIBUTE(6,0);
int gendb_search(struct ldb_context *ldb,
TALLOC_CTX *mem_ctx,
struct ldb_dn *basedn,
struct ldb_message ***res,
const char * const *attrs,
const char *format, ...) _PRINTF_ATTRIBUTE(6,7);
int gendb_search_dn(struct ldb_context *ldb,
TALLOC_CTX *mem_ctx,
struct ldb_dn *dn,
struct ldb_message ***res,
const char * const *attrs);
int gendb_add_ldif(struct ldb_context *ldb, const char *ldif_string);
char *wrap_casefold(void *context, void *mem_ctx, const char *s);
#undef _PRINTF_ATTRIBUTE
#define _PRINTF_ATTRIBUTE(a1, a2)
#endif /* __LIB_UTIL_UTIL_LDB_H__ */

View File

@ -23,7 +23,7 @@
#include "libcli/cldap/cldap.h"
#include "lib/ldb/include/ldb.h"
#include "lib/ldb/include/ldb_errors.h"
#include "lib/db_wrap.h"
#include "lib/ldb_wrap.h"
#include "dsdb/samdb/samdb.h"
#include "dsdb/common/flags.h"
#include "librpc/gen_ndr/ndr_drsuapi_c.h"

View File

@ -26,7 +26,8 @@
#include "lib/ldb/include/ldb_errors.h"
#include "param/secrets.h"
#include "dsdb/samdb/samdb.h"
#include "db_wrap.h"
#include "ldb_wrap.h"
#include "util/util_ldb.h"
#include "libcli/security/security.h"
#include "auth/credentials/credentials.h"
#include "auth/credentials/credentials_krb5.h"

View File

@ -27,8 +27,9 @@
#include "libcli/ldap/ldap.h"
#include "dsdb/samdb/samdb.h"
#include "auth/auth.h"
#include "util/util_ldb.h"
#include "librpc/gen_ndr/ndr_misc.h"
#include "db_wrap.h"
#include "ldb_wrap.h"
#include "libcli/security/security.h"
#include "librpc/rpc/dcerpc.h"
#include "param/param.h"

View File

@ -23,7 +23,7 @@
#include "libcli/cldap/cldap.h"
#include "lib/ldb/include/ldb.h"
#include "lib/ldb/include/ldb_errors.h"
#include "lib/db_wrap.h"
#include "lib/ldb_wrap.h"
#include "dsdb/samdb/samdb.h"
#include "dsdb/common/flags.h"
#include "librpc/gen_ndr/ndr_drsuapi_c.h"

View File

@ -25,7 +25,7 @@
#include "lib/ldb/include/ldb.h"
#include "dsdb/samdb/samdb.h"
#include "auth/auth.h"
#include "db_wrap.h"
#include "util/util_ldb.h"
#include "librpc/gen_ndr/ndr_nbt.h"
#include "param/param.h"

View File

@ -27,7 +27,7 @@
#include "lib/ldb/include/ldb_errors.h"
#include "librpc/gen_ndr/ndr_nbt.h"
#include "system/time.h"
#include "db_wrap.h"
#include "ldb_wrap.h"
#include "system/network.h"
#include "lib/socket/netif.h"
#include "param/param.h"

View File

@ -33,7 +33,8 @@
#include "lib/ldb/include/ldb.h"
#include "auth/auth.h"
#include "dsdb/samdb/samdb.h"
#include "db_wrap.h"
#include "ldb_wrap.h"
#include "util/util_ldb.h"
#include "rpc_server/common/common.h"
#include "param/param.h"

View File

@ -28,7 +28,6 @@
#include "system/filesys.h"
#include "lib/tdb/include/tdb.h"
#include "messaging/messaging.h"
#include "db_wrap.h"
#include "lib/messaging/irpc.h"
#include "libcli/libcli.h"
#include "cluster/cluster.h"

View File

@ -28,7 +28,7 @@
#include "lib/tdb/include/tdb.h"
#include "lib/util/util_tdb.h"
#include "messaging/messaging.h"
#include "db_wrap.h"
#include "tdb_wrap.h"
#include "lib/messaging/irpc.h"
#include "librpc/gen_ndr/ndr_notify.h"
#include "lib/util/dlinklist.h"

View File

@ -41,7 +41,7 @@
#include "system/filesys.h"
#include "lib/tdb/include/tdb.h"
#include "messaging/messaging.h"
#include "db_wrap.h"
#include "tdb_wrap.h"
#include "lib/messaging/irpc.h"
#include "librpc/gen_ndr/ndr_opendb.h"
#include "ntvfs/ntvfs.h"

View File

@ -27,7 +27,8 @@
#include "vfs_posix.h"
#include "librpc/gen_ndr/security.h"
#include "lib/tdb/include/tdb.h"
#include "db_wrap.h"
#include "tdb_wrap.h"
#include "util/util_ldb.h"
#include "libcli/security/security.h"
#include "lib/events/events.h"

View File

@ -22,7 +22,7 @@
#include "includes.h"
#include "vfs_posix.h"
#include "lib/tdb/include/tdb.h"
#include "db_wrap.h"
#include "tdb_wrap.h"
#define XATTR_LIST_ATTR ".xattr_list"

View File

@ -47,4 +47,4 @@ PRIVATE_DEPENDENCIES = LIBLDB
[SUBSYSTEM::SECRETS]
OBJ_FILES = secrets.o
PRIVATE_DEPENDENCIES = DB_WRAP UTIL_TDB
PRIVATE_DEPENDENCIES = LDB_WRAP UTIL_TDB

View File

@ -25,10 +25,12 @@
#include "secrets.h"
#include "param/param.h"
#include "system/filesys.h"
#include "db_wrap.h"
#include "tdb_wrap.h"
#include "ldb_wrap.h"
#include "lib/ldb/include/ldb.h"
#include "lib/tdb/include/tdb.h"
#include "lib/util/util_tdb.h"
#include "lib/util/util_ldb.h"
#include "dsdb/samdb/samdb.h"
static struct tdb_wrap *tdb;

View File

@ -23,7 +23,7 @@
#include "ldb/include/ldb.h"
#include "ldb/include/ldb_errors.h"
#include "auth/auth.h"
#include "db_wrap.h"
#include "ldb_wrap.h"
#include "param/share.h"
#include "param/param.h"

View File

@ -21,6 +21,7 @@
*/
#include "rpc_server/lsa/lsa.h"
#include "util/util_ldb.h"
/*
this type allows us to distinguish handle types

View File

@ -30,7 +30,7 @@
#include "libcli/security/security.h"
#include "libcli/auth/libcli_auth.h"
#include "param/secrets.h"
#include "db_wrap.h"
#include "util/util_ldb.h"
#include "librpc/gen_ndr/ndr_dssetup.h"
#include "param/param.h"

View File

@ -28,7 +28,7 @@
#include "auth/auth_sam.h"
#include "dsdb/samdb/samdb.h"
#include "rpc_server/samr/proto.h"
#include "db_wrap.h"
#include "util/util_ldb.h"
#include "libcli/auth/libcli_auth.h"
#include "auth/gensec/schannel_state.h"
#include "libcli/security/security.h"

View File

@ -34,7 +34,7 @@
#include "libcli/ldap/ldap.h"
#include "libcli/security/security.h"
#include "rpc_server/samr/proto.h"
#include "db_wrap.h"
#include "util/util_ldb.h"
#include "param/param.h"
/* these query macros make samr_Query[User|Group]Info a bit easier to read */

View File

@ -32,7 +32,7 @@
#include "auth/auth.h"
#include "rpc_server/samr/proto.h"
#include "libcli/auth/libcli_auth.h"
#include "db_wrap.h"
#include "util/util_ldb.h"
/*
samr_ChangePasswordUser

View File

@ -25,7 +25,7 @@
#include "lib/appweb/ejs/ejs.h"
#include "lib/ldb/include/ldb.h"
#include "lib/ldb/include/ldb_errors.h"
#include "db_wrap.h"
#include "ldb_wrap.h"
#include "dsdb/samdb/samdb.h"
#include "librpc/ndr/libndr.h"

View File

@ -22,7 +22,6 @@
#include "includes.h"
#include "scripting/ejs/smbcalls.h"
#include "lib/appweb/ejs/ejs.h"
#include "db_wrap.h"
#include "dsdb/samdb/samdb.h"
#include "librpc/ndr/libndr.h"
#include "lib/registry/registry.h"

View File

@ -22,7 +22,7 @@
#include "includes.h"
#include "libcli/ldap/ldap_client.h"
#include "lib/cmdline/popt_common.h"
#include "db_wrap.h"
#include "ldb_wrap.h"
#include "lib/ldb/include/ldb.h"
#include "lib/ldb/include/ldb_errors.h"
#include "dsdb/samdb/samdb.h"

View File

@ -22,7 +22,7 @@
#include "includes.h"
#include "libcli/ldap/ldap_client.h"
#include "lib/cmdline/popt_common.h"
#include "db_wrap.h"
#include "ldb_wrap.h"
#include "lib/ldb/include/ldb.h"
#include "lib/ldb/include/ldb_errors.h"
#include "dsdb/samdb/samdb.h"

View File

@ -35,7 +35,7 @@
#include "librpc/gen_ndr/ndr_misc.h"
#include "system/time.h"
#include "auth/auth.h"
#include "lib/db_wrap.h"
#include "lib/ldb_wrap.h"
#include "lib/appweb/ejs/ejs.h"
#include "lib/appweb/ejs/ejsInternal.h"
#include "scripting/ejs/smbcalls.h"

View File

@ -24,7 +24,8 @@
#include "lib/tdb/include/tdb.h"
#include "lib/ldb/include/ldb.h"
#include "lib/ldb/include/ldb_errors.h"
#include "lib/db_wrap.h"
#include "lib/ldb_wrap.h"
#include "lib/tdb_wrap.h"
#include "torture/torture.h"
#include "param/param.h"

View File

@ -29,7 +29,7 @@
#include "smbd/process_model.h"
#include "smb_server/smb_server.h"
#include "lib/socket/netif.h"
#include "dlinklist.h"
#include "util/dlinklist.h"
#include "ntvfs/ntvfs.h"
#include "param/param.h"

View File

@ -30,7 +30,7 @@
#include "ldb/include/ldb.h"
#include "ldb/include/ldb_errors.h"
#include "auth/auth.h"
#include "db_wrap.h"
#include "ldb_wrap.h"
#include "param/param.h"
static struct ldb_context *wins_config_db_connect(TALLOC_CTX *mem_ctx)