svn commit: samba r16805 - in branches/SOC/mkhl/samdb-map/ldb_modules: .

mkhl at samba.org mkhl at samba.org
Tue Jul 4 18:45:47 GMT 2006


Author: mkhl
Date: 2006-07-04 18:45:47 +0000 (Tue, 04 Jul 2006)
New Revision: 16805

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16805

Log:
Replay samba3sam-adapt-to-ldb_map.patch (r16575):

Include necessary headers to let samba3sam compile.
Adapt `ldb_samba3sam_module_init' to the fixed ldb_map init code.

Martin


Modified:
   branches/SOC/mkhl/samdb-map/ldb_modules/samba3sam.c


Changeset:
Modified: branches/SOC/mkhl/samdb-map/ldb_modules/samba3sam.c
===================================================================
--- branches/SOC/mkhl/samdb-map/ldb_modules/samba3sam.c	2006-07-04 18:39:12 UTC (rev 16804)
+++ branches/SOC/mkhl/samdb-map/ldb_modules/samba3sam.c	2006-07-04 18:45:47 UTC (rev 16805)
@@ -5,11 +5,17 @@
 */
 
 #include "includes.h"
-#include "ldb/modules/ldb_map.h"
 #include "ldb/include/ldb.h"
 #include "ldb/include/ldb_private.h"
+#include "ldb/include/ldb_errors.h"
+#include "ldb/modules/ldb_map.h"
 #include "system/passwd.h"
 
+#include "librpc/gen_ndr/ndr_security.h"
+#include "librpc/ndr/libndr.h"
+#include "libcli/security/security.h"
+#include "libcli/security/proto.h"
+
 /* 
  * sambaSID -> member  (dn!)
  * sambaSIDList -> member (dn!) 
@@ -855,8 +861,23 @@
 	}
 };
 
+/* the context init function */
+static int samba3sam_init(struct ldb_module *module)
+{
+        int ret;
+
+	ret = ldb_map_init(module, samba3_attributes, samba3_objectclasses, "samba3sam");
+        if (ret != LDB_SUCCESS)
+                return ret;
+
+        return ldb_next_init(module);
+}
+
 /* the init function */
 int ldb_samba3sam_module_init(void)
 {
-	return ldb_map_init(ldb, samba3_attributes, samba3_objectclasses, "samba3sam");
+        struct ldb_module_ops ops = ldb_map_get_ops();
+        ops.init_context = samba3sam_init;
+
+        return ldb_register_module(&ops);
 }



More information about the samba-cvs mailing list