r23792: convert Samba4 to GPLv3
[tprouty/samba.git] / source4 / dsdb / samdb / ldb_modules / schema.c
index fe275ce841622f4901c6e8a863c07ee56e19f810..2de5e892ed1266fd93d536024b28978c34344831 100644 (file)
@@ -5,7 +5,7 @@
 
    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 2 of the License, or
+   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,
@@ -14,8 +14,7 @@
    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, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 /*
@@ -946,7 +945,7 @@ static int schema_check_attributes_syntax(struct schema_context *sctx)
                if (attr == NULL) {
                        return LDB_ERR_NO_SUCH_ATTRIBUTE;
                }
-               ret = schema_validate(&msg->elements[i], attr->syntax, attr->single, attr->min, attr->max);
+               ret = schema_validate(sctx->module->ldb, &msg->elements[i], attr->syntax, attr->single, attr->min, attr->max);
                if (ret != LDB_SUCCESS) {
                        return ret;
                }
@@ -1187,7 +1186,7 @@ static int schema_init(struct ldb_module *module)
 
        /* find the schema partition */
        ret = ldb_search(module->ldb,
-                        ldb_dn_new(module),
+                        ldb_dn_new(module, module->ldb, NULL),
                         LDB_SCOPE_BASE,
                         "(objectClass=*)",
                         schema_attrs,
@@ -1200,7 +1199,7 @@ static int schema_init(struct ldb_module *module)
                return LDB_ERR_OPERATIONS_ERROR;
        }
 
-       data->schema_dn = ldb_msg_find_attr_as_dn(data, res->msgs[0], "schemaNamingContext");
+       data->schema_dn = ldb_msg_find_attr_as_dn(module->ldb, data, res->msgs[0], "schemaNamingContext");
        if (data->schema_dn == NULL) {
                /* FIXME: return a clear error string */
                talloc_free(data);