s4-dsdb: register the DCPROMO_OID control with the rootdse
authorAndrew Tridgell <tridge@samba.org>
Tue, 19 Oct 2010 03:53:14 +0000 (14:53 +1100)
committerAndrew Tridgell <tridge@samba.org>
Tue, 19 Oct 2010 04:44:23 +0000 (04:44 +0000)
this is needed to allow it over ldap

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue Oct 19 04:44:23 UTC 2010 on sn-devel-104

source4/dsdb/samdb/ldb_modules/objectclass.c

index 02c3e4680fc43b7e849051193d29a839ddac2c9e..c389965accf72b1676d28912759aaee8d357d10f 100644 (file)
@@ -1498,6 +1498,13 @@ static int objectclass_init(struct ldb_module *module)
        /* 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));
 
+       ret = ldb_mod_register_control(module, LDB_CONTROL_RODC_DCPROMO_OID);
+       if (ret != LDB_SUCCESS) {
+               ldb_debug(ldb, LDB_DEBUG_ERROR,
+                         "objectclass_init: Unable to register control DCPROMO with rootdse\n");
+               return ldb_operr(ldb);
+       }
+
        return ret;
 }