summaryrefslogtreecommitdiff
path: root/source4/lib/samba3
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-08-24 22:06:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:34:33 -0500
commit98b303e2ebf0814856759499a99c40d5cd4f9f00 (patch)
treeb8ef01b7428cbc8554f642be2554d66ae612cef5 /source4/lib/samba3
parent47843f2b64001552b4606b2a2ecd6cefbf3971ba (diff)
downloadsamba-98b303e2ebf0814856759499a99c40d5cd4f9f00.tar.gz
samba-98b303e2ebf0814856759499a99c40d5cd4f9f00.tar.bz2
samba-98b303e2ebf0814856759499a99c40d5cd4f9f00.zip
r9595: Add ldb map module
(This used to be commit e0a0d3f092d601a22b7549a0278735e66239b301)
Diffstat (limited to 'source4/lib/samba3')
-rw-r--r--source4/lib/samba3/config.mk3
-rw-r--r--source4/lib/samba3/ldb_samba3.c50
2 files changed, 52 insertions, 1 deletions
diff --git a/source4/lib/samba3/config.mk b/source4/lib/samba3/config.mk
index 75073048d0..b5bf3fadb9 100644
--- a/source4/lib/samba3/config.mk
+++ b/source4/lib/samba3/config.mk
@@ -10,7 +10,8 @@ ADD_OBJ_FILES = \
lib/samba3/samba3.o \
lib/samba3/group.o \
lib/samba3/registry.o \
- lib/samba3/secrets.o
+ lib/samba3/secrets.o \
+ lib/samba3/ldb_samba3.o
# End SUBSYSTEM LIBSAMBA3
################################################
diff --git a/source4/lib/samba3/ldb_samba3.c b/source4/lib/samba3/ldb_samba3.c
new file mode 100644
index 0000000000..fa13daa611
--- /dev/null
+++ b/source4/lib/samba3/ldb_samba3.c
@@ -0,0 +1,50 @@
+/*
+ ldb database library - Samba3 compatibility backend
+
+ Copyright (C) Jelmer Vernooij 2005
+
+ ** 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 2 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, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+
+#include "includes.h"
+#include "ldb/ldb_map/ldb_map.h"
+#include "ldb/include/ldb.h"
+#include "ldb/include/ldb_private.h"
+
+/*
+ * sambaGroupMapping -> group
+ * gidNumber -> ???
+ * sambaSID -> member
+ * sambaGroupType -> groupType
+ * displayName -> name
+ * description -> description
+ * sambaSIDList -> member
+ */
+
+struct ldb_map_mappings samba3_mappings;
+
+/* the init function */
+#ifdef HAVE_DLOPEN_DISABLED
+ struct ldb_module *init_module(struct ldb_context *ldb, const char *options[])
+#else
+struct ldb_module *ldb_samba3_module_init(struct ldb_context *ldb, const char *options[])
+#endif
+{
+ return ldb_map_init(ldb, &samba3_mappings, options);
+}