And remove this helper module - it does not have much sense keeping it.
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Apr 11 06:31:51 CEST 2012 on sn-devel-104
#include "librpc/gen_ndr/ndr_security.h"
#include "param/param.h"
#include "dsdb/samdb/ldb_modules/util.h"
-#include "dsdb/samdb/ldb_modules/schema.h"
#include "lib/util/tsort.h"
#include "system/kerberos.h"
#include "auth/kerberos/kerberos.h"
return NULL;
}
- object_class = get_last_structural_class(schema, oc_el);
+ object_class = dsdb_get_last_structural_class(schema, oc_el);
if (object_class == NULL) {
return NULL;
}
#include "librpc/ndr/libndr.h"
#include "librpc/gen_ndr/ndr_security.h"
#include "libcli/security/security.h"
-#include "dsdb/samdb/ldb_modules/schema.h"
#include "auth/auth.h"
#include "param/param.h"
#include "dsdb/samdb/ldb_modules/util.h"
return ldb_operr(ldb);
}
- objectclass = get_last_structural_class(schema, objectclass_element);
+ objectclass = dsdb_get_last_structural_class(schema,
+ objectclass_element);
if (objectclass == NULL) {
return ldb_operr(ldb);
}
return ldb_operr(ldb);
}
- objectclass = get_last_structural_class(schema, objectclass_element);
+ objectclass = dsdb_get_last_structural_class(schema,
+ objectclass_element);
if (objectclass == NULL) {
return ldb_operr(ldb);
}
#include "auth/auth.h"
#include "param/param.h"
#include "../libds/common/flags.h"
-#include "dsdb/samdb/ldb_modules/schema.h"
#include "dsdb/samdb/ldb_modules/util.h"
struct oc_context {
* Get the new top-most structural object class and check for
* unrelated structural classes
*/
- objectclass = get_last_structural_class(ac->schema,
- objectclass_element);
+ objectclass = dsdb_get_last_structural_class(ac->schema,
+ objectclass_element);
if (objectclass == NULL) {
ldb_asprintf_errstring(ldb,
"Failed to find a structural class for %s",
* Get the new top-most structural object class and check for
* unrelated structural classes
*/
- objectclass = get_last_structural_class(ac->schema, oc_el_entry);
+ objectclass = dsdb_get_last_structural_class(ac->schema,
+ oc_el_entry);
if (objectclass == NULL) {
ldb_set_errstring(ldb,
"objectclass: cannot delete all structural objectclasses!");
/* existing entry without a valid object class? */
return ldb_operr(ldb);
}
- objectclass = get_last_structural_class(ac->schema, oc_el_entry);
+ objectclass = dsdb_get_last_structural_class(ac->schema,
+ oc_el_entry);
if (objectclass == NULL) {
/* existing entry without a valid object class? */
return ldb_operr(ldb);
+++ /dev/null
-/*
- Unix SMB/CIFS implementation.
- Samba utility functions
-
- Copyright (C) Andrew Tridgell 2009
- Copyright (C) Andrew Bartlett <abartlet@samba.org> 2009
-
- 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
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "includes.h"
-#include "ldb.h"
-#include "ldb_module.h"
-#include "librpc/ndr/libndr.h"
-#include "dsdb/samdb/ldb_modules/util.h"
-#include "dsdb/samdb/samdb.h"
-#include "dsdb/common/util.h"
-#include "libcli/security/security.h"
-#include "dsdb/samdb/ldb_modules/schema.h"
-
-/*
- * This function determines the (last) structural or 88 object class of a passed
- * "objectClass" attribute - per MS-ADTS 3.1.1.1.4 this is the last value.
- * Without schema this does not work and hence NULL is returned.
- */
-const struct dsdb_class *get_last_structural_class(const struct dsdb_schema *schema,
- const struct ldb_message_element *element)
-{
- const struct dsdb_class *last_class;
-
- if (schema == NULL) {
- return NULL;
- }
-
- if (element->num_values == 0) {
- return NULL;
- }
-
- last_class = dsdb_class_by_lDAPDisplayName_ldb_val(schema,
- &element->values[element->num_values-1]);
- if (last_class == NULL) {
- return NULL;
- }
- if (last_class->objectClassCategory > 1) {
- return NULL;
- }
-
- return last_class;
-}
-
-
return el;
}
+
+/*
+ * This function determines the (last) structural or 88 object class of a passed
+ * "objectClass" attribute - per MS-ADTS 3.1.1.1.4 this is the last value.
+ * Without schema this does not work and hence NULL is returned.
+ */
+const struct dsdb_class *dsdb_get_last_structural_class(const struct dsdb_schema *schema,
+ const struct ldb_message_element *element)
+{
+ const struct dsdb_class *last_class;
+
+ if (schema == NULL) {
+ return NULL;
+ }
+
+ if (element->num_values == 0) {
+ return NULL;
+ }
+
+ last_class = dsdb_class_by_lDAPDisplayName_ldb_val(schema,
+ &element->values[element->num_values-1]);
+ if (last_class == NULL) {
+ return NULL;
+ }
+ if (last_class->objectClassCategory > 1) {
+ return NULL;
+ }
+
+ return last_class;
+}
bld.SAMBA_LIBRARY('dsdb-module',
source=[],
- deps='DSDB_MODULE_HELPERS DSDB_MODULE_HELPER_SCHEMA DSDB_MODULE_HELPER_RIDALLOC',
+ deps='DSDB_MODULE_HELPERS DSDB_MODULE_HELPER_RIDALLOC',
private_library=True,
grouping_library=True)
deps='MESSAGING',
)
-bld.SAMBA_SUBSYSTEM('DSDB_MODULE_HELPER_SCHEMA',
- source='schema.c',
- autoproto='schema.h',
- deps='SAMDB_SCHEMA'
- )
-
bld.SAMBA_MODULE('ldb_samba_dsdb',
source='samba_dsdb.c',
subsystem='ldb',
init_function='ldb_objectclass_module_init',
module_init_name='ldb_init_module',
internal_module=False,
- deps='talloc samdb DSDB_MODULE_HELPERS samba-util DSDB_MODULE_HELPER_SCHEMA'
+ deps='talloc samdb DSDB_MODULE_HELPERS samba-util'
)
init_function='ldb_descriptor_module_init',
module_init_name='ldb_init_module',
internal_module=False,
- deps='talloc security NDR_SECURITY samdb DSDB_MODULE_HELPERS DSDB_MODULE_HELPER_SCHEMA'
+ deps='talloc security NDR_SECURITY samdb DSDB_MODULE_HELPERS'
)
init_function='ldb_acl_module_init',
module_init_name='ldb_init_module',
internal_module=False,
- deps='talloc security samdb DSDB_MODULE_HELPERS DSDB_MODULE_HELPER_SCHEMA'
+ deps='talloc security samdb DSDB_MODULE_HELPERS'
)
init_function='ldb_dirsync_module_init',
module_init_name='ldb_init_module',
internal_module=False,
- deps='talloc security samdb DSDB_MODULE_HELPERS DSDB_MODULE_HELPER_SCHEMA'
+ deps='talloc security samdb DSDB_MODULE_HELPERS'
)