-/*
+/*
ldb database library
Copyright (C) Simo Sorce 2006-2008
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/>.
*/
*
* Component: objectClass sorting and constraint checking module
*
- * Description:
+ * Description:
* - sort the objectClass attribute into the class
* hierarchy and perform constraint checks (correct RDN name,
* valid parent),
The resulting DN should be:
CN=Admins,CN=Users,DC=samba,DC=example,DC=com
-
+
*/
static int fix_dn(struct ldb_context *ldb,
TALLOC_CTX *mem_ctx,
- struct ldb_dn *newdn, struct ldb_dn *parent_dn,
- struct ldb_dn **fixed_dn)
+ struct ldb_dn *newdn, struct ldb_dn *parent_dn,
+ struct ldb_dn **fixed_dn)
{
char *upper_rdn_attr;
const struct ldb_val *rdn_val;
}
/* We need the attribute name in upper case */
- upper_rdn_attr = strupper_talloc(*fixed_dn,
+ upper_rdn_attr = strupper_talloc(*fixed_dn,
ldb_dn_get_rdn_name(newdn));
if (upper_rdn_attr == NULL) {
return ldb_oom(ldb);
instanceType = ldb_msg_find_attr_as_uint(msg, "instanceType",
0);
if (!(instanceType & INSTANCE_TYPE_IS_NC_HEAD)) {
- ldb_asprintf_errstring(ldb, "objectclass: Cannot add %s, parent does not exist!",
+ ldb_asprintf_errstring(ldb, "objectclass: Cannot add %s, parent does not exist!",
ldb_dn_get_linearized(msg->dn));
return LDB_ERR_NO_SUCH_OBJECT;
}
ac, ac->req->op.mod.message->dn,
LDB_SCOPE_BASE,
"(objectClass=*)",
- attrs, NULL,
+ attrs, NULL,
ac, get_search_callback,
ac->req);
LDB_REQ_SET_LOCATION(search_req);
if (ret != LDB_SUCCESS) {
return ret;
}
-
+
/* Look for the opaque to indicate we might have to cut down the DN of defaultObjectCategory */
ldb_module_set_private(module, ldb_get_opaque(ldb, DSDB_EXTENDED_DN_STORE_FORMAT_OPAQUE_NAME));
!ldb_request_get_control(ac->req, LDB_CONTROL_RELAX_OID) &&
!ldb_request_get_control(ac->req, DSDB_CONTROL_DBCHECK)) {
/* Odd is for the target. Illegal to modify */
- ldb_asprintf_errstring(ldb,
- "objectclass_attrs: attribute '%s' on entry '%s' must not be modified directly, it is a linked attribute",
+ ldb_asprintf_errstring(ldb,
+ "objectclass_attrs: attribute '%s' on entry '%s' must not be modified directly, it is a linked attribute",
msg->elements[i].name,
ldb_dn_get_linearized(msg->dn));
return LDB_ERR_UNWILLING_TO_PERFORM;
}
if (!found) {
/* we allow this for dbcheck to fix the rest of this broken entry */
- if (!ldb_request_get_control(ac->req, DSDB_CONTROL_DBCHECK) ||
+ if (!ldb_request_get_control(ac->req, DSDB_CONTROL_DBCHECK) ||
ac->req->operation == LDB_ADD) {
ldb_asprintf_errstring(ldb, "objectclass_attrs: attribute '%s' on entry '%s' does not exist in the specified objectclasses!",
msg->elements[i].name,