+ if ((tdb->flags & TDB_ALLOW_NESTING) &&
+ (tdb->flags & TDB_DISALLOW_NESTING)) {
+ tdb->ecode = TDB_ERR_NESTING;
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_open_ex: "
+ "allow_nesting and disallow_nesting are not allowed together!"));
+ errno = EINVAL;
+ goto fail;
+ }
+
+ /*
+ * TDB_DISALLOW_NESTING is the default behavior.
+ */
+ if (!(tdb->flags & TDB_ALLOW_NESTING)) {
+ tdb->flags |= TDB_DISALLOW_NESTING;
+ }
+