svn commit: samba r16575 - in branches/SOC/mkhl: .

mkhl at samba.org mkhl at samba.org
Tue Jun 27 23:36:52 GMT 2006


Author: mkhl
Date: 2006-06-27 23:36:49 +0000 (Tue, 27 Jun 2006)
New Revision: 16575

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

Log:

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

Martin

Added:
   branches/SOC/mkhl/samba3sam.c-adapt-to-ldb_map.patch


Changeset:
Added: branches/SOC/mkhl/samba3sam.c-adapt-to-ldb_map.patch
===================================================================
--- branches/SOC/mkhl/samba3sam.c-adapt-to-ldb_map.patch	2006-06-27 23:27:53 UTC (rev 16574)
+++ branches/SOC/mkhl/samba3sam.c-adapt-to-ldb_map.patch	2006-06-27 23:36:49 UTC (rev 16575)
@@ -0,0 +1,48 @@
+Index: dsdb/samdb/ldb_modules/samba3sam.c
+===================================================================
+--- dsdb/samdb/ldb_modules/samba3sam.c	(revision 16565)
++++ dsdb/samdb/ldb_modules/samba3sam.c	(working copy)
+@@ -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