summaryrefslogtreecommitdiffstats
path: root/server/ldb_modules
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2009-02-25 16:40:17 -0500
committerSimo Sorce <ssorce@redhat.com>2009-02-26 09:13:20 -0500
commitc9f6d2795fde2f9bf80277d425df2b44bc860226 (patch)
tree301e1217eb5fda73351e9c7fb2f73048853942df /server/ldb_modules
parent03fa4034a6a74a326e5340dae42d85eea4516b3c (diff)
downloadsssd-c9f6d2795fde2f9bf80277d425df2b44bc860226.tar.gz
sssd-c9f6d2795fde2f9bf80277d425df2b44bc860226.tar.xz
sssd-c9f6d2795fde2f9bf80277d425df2b44bc860226.zip
Rebase the code to use talloc, tdb, tevent, ldb as external
dependencies based on the latest samba code. Convert all references to the old events library to use the renamed tevent library.
Diffstat (limited to 'server/ldb_modules')
-rw-r--r--server/ldb_modules/ldb_module.h111
-rw-r--r--server/ldb_modules/memberof.c7
2 files changed, 2 insertions, 116 deletions
diff --git a/server/ldb_modules/ldb_module.h b/server/ldb_modules/ldb_module.h
deleted file mode 100644
index f41941da8..000000000
--- a/server/ldb_modules/ldb_module.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- ldb database library
-
- Copyright (C) Simo Sorce 2008
-
- ** NOTE! The following LGPL license applies to the ldb
- ** library. This does NOT imply that all of Samba is released
- ** under the LGPL
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 3 of the License, or (at your option) any later version.
-
- This library 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, see <http://www.gnu.org/licenses/>.
-*/
-
-/*
- * Name: ldb
- *
- * Component: ldb module header
- *
- * Description: defines ldb modules structures and helpers
- *
- */
-
-#ifndef _LDB_MODULE_H_
-#define _LDB_MODULE_H_
-
-struct ldb_context;
-struct ldb_module;
-
-/*
- these function pointers define the operations that a ldb module can intercept
-*/
-struct ldb_module_ops {
- const char *name;
- int (*init_context) (struct ldb_module *);
- int (*search)(struct ldb_module *, struct ldb_request *); /* search */
- int (*add)(struct ldb_module *, struct ldb_request *); /* add */
- int (*modify)(struct ldb_module *, struct ldb_request *); /* modify */
- int (*del)(struct ldb_module *, struct ldb_request *); /* delete */
- int (*rename)(struct ldb_module *, struct ldb_request *); /* rename */
- int (*request)(struct ldb_module *, struct ldb_request *); /* match any other operation */
- int (*extended)(struct ldb_module *, struct ldb_request *); /* extended operations */
- int (*start_transaction)(struct ldb_module *);
- int (*end_transaction)(struct ldb_module *);
- int (*del_transaction)(struct ldb_module *);
- int (*sequence_number)(struct ldb_module *, struct ldb_request *);
- void *private_data;
-};
-
-
-/* MODULES specific headers -- SSS */
-
-/* The following definitions come from lib/ldb/common/ldb_modules.c */
-
-struct ldb_context *ldb_module_get_ctx(struct ldb_module *module);
-
-int ldb_next_request(struct ldb_module *module, struct ldb_request *request);
-int ldb_next_start_trans(struct ldb_module *module);
-int ldb_next_end_trans(struct ldb_module *module);
-int ldb_next_del_trans(struct ldb_module *module);
-int ldb_next_init(struct ldb_module *module);
-
-void ldb_set_errstring(struct ldb_context *ldb, const char *err_string);
-void ldb_asprintf_errstring(struct ldb_context *ldb, const char *format, ...) PRINTF_ATTRIBUTE(2,3);
-void ldb_reset_err_string(struct ldb_context *ldb);
-
-const char *ldb_default_modules_dir(void);
-
-int ldb_register_module(const struct ldb_module_ops *);
-
-typedef int (*ldb_connect_fn)(struct ldb_context *ldb, const char *url,
- unsigned int flags, const char *options[],
- struct ldb_module **module);
-
-struct ldb_backend_ops {
- const char *name;
- ldb_connect_fn connect_fn;
-};
-
-const char *ldb_default_modules_dir(void);
-
-int ldb_register_backend(const char *url_prefix, ldb_connect_fn);
-
-void *ldb_dso_load_symbol(struct ldb_context *ldb, const char *name,
- const char *symbol);
-
-struct ldb_handle *ldb_handle_new(TALLOC_CTX *mem_ctx, struct ldb_context *ldb);
-
-int ldb_module_send_entry(struct ldb_request *req,
- struct ldb_message *msg);
-
-int ldb_module_send_referral(struct ldb_request *req,
- char *ref);
-
-int ldb_module_done(struct ldb_request *req,
- struct ldb_control **ctrls,
- struct ldb_extended *response,
- int error);
-
-int ldb_mod_register_control(struct ldb_module *module, const char *oid);
-
-#endif
diff --git a/server/ldb_modules/memberof.c b/server/ldb_modules/memberof.c
index 956245bd5..8b61549a9 100644
--- a/server/ldb_modules/memberof.c
+++ b/server/ldb_modules/memberof.c
@@ -17,11 +17,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "replace.h"
-#include "talloc.h"
-#include "ldb.h"
-#include "ldb_errors.h"
-#include "ldb_modules/ldb_module.h"
+#include <string.h>
+#include "ldb_module.h"
#ifndef MAX
#define MAX(a,b) (((a) > (b)) ? (a) : (b))