summaryrefslogtreecommitdiff
path: root/src/ldb_modules
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2011-02-09 15:50:07 -0500
committerStephen Gallagher <sgallagh@redhat.com>2011-02-11 09:17:55 -0500
commit23e8d84320ae8b76d244764c02e44036e96cd4df (patch)
treed69c4b2c3214ebd1fd7a5f22c7d108fa4985cfc3 /src/ldb_modules
parentb467b593c344d7de5cc2bbf141bc959e5d248de1 (diff)
downloadsssd-23e8d84320ae8b76d244764c02e44036e96cd4df.tar.gz
sssd-23e8d84320ae8b76d244764c02e44036e96cd4df.tar.bz2
sssd-23e8d84320ae8b76d244764c02e44036e96cd4df.zip
Fix module registration with newer LDB libraries.
Diffstat (limited to 'src/ldb_modules')
-rw-r--r--src/ldb_modules/memberof.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/ldb_modules/memberof.c b/src/ldb_modules/memberof.c
index 311e7e51..55c52fdc 100644
--- a/src/ldb_modules/memberof.c
+++ b/src/ldb_modules/memberof.c
@@ -1,7 +1,7 @@
/*
SSSD memberof module
- Copyright (C) Simo Sorce <idra@samba.org> 2008
+ Copyright (C) Simo Sorce <idra@samba.org> 2008-2011
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
@@ -17,6 +17,11 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+/* Temporary workaround, will be fixed in ldb upstream soon */
+#ifndef LDB_VERSION
+#define LDB_VERSION "0.9.22"
+#endif
+
#include <string.h>
#include "ldb_module.h"
#include "util/util.h"
@@ -3623,3 +3628,11 @@ const struct ldb_module_ops ldb_memberof_module_ops = {
.modify = memberof_mod,
.del = memberof_del,
};
+
+int ldb_init_module(const char *version)
+{
+#ifdef LDB_MODULE_CHECK_VERSION
+ LDB_MODULE_CHECK_VERSION(version);
+#endif
+ return ldb_register_module(&ldb_memberof_module_ops);
+}