summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules/schema.c
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2012-04-04 22:24:16 +0200
committerAndrew Bartlett <abartlet@samba.org>2012-04-11 06:31:51 +0200
commit0c44d46f24ef69598eaef281bcb82f943655d0bc (patch)
tree6219094ce16ab0e5332ddcf50a3bec11a731e891 /source4/dsdb/samdb/ldb_modules/schema.c
parent83062125e60dd097a1a151fb35467fe55a356780 (diff)
downloadsamba-0c44d46f24ef69598eaef281bcb82f943655d0bc.tar.gz
samba-0c44d46f24ef69598eaef281bcb82f943655d0bc.tar.bz2
samba-0c44d46f24ef69598eaef281bcb82f943655d0bc.zip
s4:dsdb/samdb/ldb_modules/schema.c - move "get_last_structural_class()" into "util.c"
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
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules/schema.c')
-rw-r--r--source4/dsdb/samdb/ldb_modules/schema.c62
1 files changed, 0 insertions, 62 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/schema.c b/source4/dsdb/samdb/ldb_modules/schema.c
deleted file mode 100644
index 233816f99a..0000000000
--- a/source4/dsdb/samdb/ldb_modules/schema.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- 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;
-}
-
-