On Wed, Feb 09, 2011 at 06:49:17PM -0500, Simo Sorce wrote:
At some point the libldb library changed how modules are loaded.
This patch makes the memberof module work with the new registration
methods.
Simo.
Please add
--- a/Makefile.am
+++ b/Makefile.am
@@ -638,6 +638,7 @@ auth_tests_SOURCES = \
$(SSSD_UTIL_OBJ)
auth_tests_CFLAGS = \
$(AM_CFLAGS) \
+ -DSYSDB_TEST \
$(CHECK_CFLAGS)
auth_tests_LDADD = \
$(SSSD_LIBS) \
to make auth-tests work again.
bye,
Sumit
--
Simo Sorce * Red Hat, Inc * New York
>From a13988cbb28ed6103353d3a2b3c4183b39b4ca01 Mon Sep 17 00:00:00
2001
From: Stephen Gallagher <sgallagh(a)redhat.com>
Date: Wed, 9 Feb 2011 15:50:07 -0500
Subject: [PATCH] Fix module registration with newer LDB libraries.
---
src/ldb_modules/memberof.c | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/src/ldb_modules/memberof.c b/src/ldb_modules/memberof.c
index 372aa544f31f40698c96619ce37e01df7cb7929f..9198e19b45b81103613d063f6e8cb14a6e6ecb63
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(a)samba.org> 2008
+ Copyright (C) Simo Sorce <idra(a)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"
@@ -3630,3 +3635,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);
+}
--
1.7.4
_______________________________________________
sssd-devel mailing list
sssd-devel(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/sssd-devel