aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libds/common/flags.h12
-rw-r--r--source4/dsdb/pydsdb.c10
-rwxr-xr-xsource4/lib/ldb/tests/python/ldap_schema.py16
-rw-r--r--source4/libnet/libnet_become_dc.c2
-rw-r--r--source4/scripting/python/samba/netcmd/domainlevel.py14
-rw-r--r--source4/scripting/python/samba/provision.py4
6 files changed, 20 insertions, 38 deletions
diff --git a/libds/common/flags.h b/libds/common/flags.h
index 396df7c1a98..be1e83917d3 100644
--- a/libds/common/flags.h
+++ b/libds/common/flags.h
@@ -170,19 +170,15 @@
#define SEARCH_FLAG_NEVERVALUEAUDIT 0x0000100
#define SEARCH_FLAG_RODC_ATTRIBUTE 0x0000200
-/* "domainFunctionality", "forestFunctionality" in the rootDSE */
+/* "domainFunctionality", "forestFunctionality" and "domainControllerFunctionality" in the rootDSE */
#define DS_DOMAIN_FUNCTION_2000 0
-#define DS_DOMAIN_FUNCTION_2003_MIXED 1
+#define DS_DOMAIN_FUNCTION_2003_MIXED 1 /* Not a valid/meaningfulxs
+ * domainControllerFunctionality
+ * Level */
#define DS_DOMAIN_FUNCTION_2003 2
#define DS_DOMAIN_FUNCTION_2008 3
#define DS_DOMAIN_FUNCTION_2008_R2 4
-/* "domainControllerFunctionality" in the rootDSE */
-#define DS_DC_FUNCTION_2000 0
-#define DS_DC_FUNCTION_2003 2
-#define DS_DC_FUNCTION_2008 3
-#define DS_DC_FUNCTION_2008_R2 4
-
/* sa->systemFlags on attributes */
#define DS_FLAG_ATTR_NOT_REPLICATED 0x00000001
#define DS_FLAG_ATTR_REQ_PARTIAL_SET_MEMBER 0x00000002
diff --git a/source4/dsdb/pydsdb.c b/source4/dsdb/pydsdb.c
index bddda8d092c..4060b327af3 100644
--- a/source4/dsdb/pydsdb.c
+++ b/source4/dsdb/pydsdb.c
@@ -578,14 +578,4 @@ void initdsdb(void)
PyInt_FromLong(DS_DOMAIN_FUNCTION_2008));
PyModule_AddObject(m, "DS_DOMAIN_FUNCTION_2008_R2",
PyInt_FromLong(DS_DOMAIN_FUNCTION_2008_R2));
-
- /* "domainControllerFunctionality" flags in the rootDSE */
- PyModule_AddObject(m, "DS_DC_FUNCTION_2000",
- PyInt_FromLong(DS_DC_FUNCTION_2000));
- PyModule_AddObject(m, "DS_DC_FUNCTION_2003",
- PyInt_FromLong(DS_DC_FUNCTION_2003));
- PyModule_AddObject(m, "DS_DC_FUNCTION_2008",
- PyInt_FromLong(DS_DC_FUNCTION_2008));
- PyModule_AddObject(m, "DS_DC_FUNCTION_2008_R2",
- PyInt_FromLong(DS_DC_FUNCTION_2008_R2));
}
diff --git a/source4/lib/ldb/tests/python/ldap_schema.py b/source4/lib/ldb/tests/python/ldap_schema.py
index 8e6865a4d24..8d1f0d00f45 100755
--- a/source4/lib/ldb/tests/python/ldap_schema.py
+++ b/source4/lib/ldb/tests/python/ldap_schema.py
@@ -20,7 +20,7 @@ from ldb import ERR_CONSTRAINT_VIOLATION
from ldb import Message, MessageElement, Dn
from ldb import FLAG_MOD_REPLACE
from samba import Ldb
-from samba.dsdb import DS_DC_FUNCTION_2003
+from samba.dsdb import DS_DOMAIN_FUNCTION_2003
from subunit.run import SubunitTestRunner
import unittest
@@ -278,7 +278,7 @@ systemOnly: FALSE
# 1. Create attribute without systemFlags
# msDS-IntId should be created if forest functional
- # level is >= DS_DC_FUNCTION_2003
+ # level is >= DS_DOMAIN_FUNCTION_2003
# and missing otherwise
(attr_name, attr_ldap_name, attr_dn) = self._make_obj_names("msDS-IntId-Attr-1-")
ldif = self._make_attr_ldif(attr_name, attr_dn)
@@ -300,7 +300,7 @@ systemOnly: FALSE
res = self.ldb.search(attr_dn, scope=SCOPE_BASE, attrs=["*"])
self.assertEquals(len(res), 1)
self.assertEquals(res[0]["lDAPDisplayName"][0], attr_ldap_name)
- if self.forest_level >= DS_DC_FUNCTION_2003:
+ if self.forest_level >= DS_DOMAIN_FUNCTION_2003:
if self._is_schema_base_object(res[0]):
self.assertTrue("msDS-IntId" not in res[0])
else:
@@ -319,7 +319,7 @@ systemOnly: FALSE
# 2. Create attribute with systemFlags = FLAG_SCHEMA_BASE_OBJECT
# msDS-IntId should be created if forest functional
- # level is >= DS_DC_FUNCTION_2003
+ # level is >= DS_DOMAIN_FUNCTION_2003
# and missing otherwise
(attr_name, attr_ldap_name, attr_dn) = self._make_obj_names("msDS-IntId-Attr-2-")
ldif = self._make_attr_ldif(attr_name, attr_dn)
@@ -342,7 +342,7 @@ systemOnly: FALSE
res = self.ldb.search(attr_dn, scope=SCOPE_BASE, attrs=["*"])
self.assertEquals(len(res), 1)
self.assertEquals(res[0]["lDAPDisplayName"][0], attr_ldap_name)
- if self.forest_level >= DS_DC_FUNCTION_2003:
+ if self.forest_level >= DS_DOMAIN_FUNCTION_2003:
if self._is_schema_base_object(res[0]):
self.assertTrue("msDS-IntId" not in res[0])
else:
@@ -384,7 +384,7 @@ systemOnly: FALSE
# 1. Create Class without systemFlags
# msDS-IntId should be created if forest functional
- # level is >= DS_DC_FUNCTION_2003
+ # level is >= DS_DOMAIN_FUNCTION_2003
# and missing otherwise
(class_name, class_ldap_name, class_dn) = self._make_obj_names("msDS-IntId-Class-1-")
ldif = self._make_class_ldif(class_dn, class_name)
@@ -421,7 +421,7 @@ systemOnly: FALSE
# 2. Create Class with systemFlags = FLAG_SCHEMA_BASE_OBJECT
# msDS-IntId should be created if forest functional
- # level is >= DS_DC_FUNCTION_2003
+ # level is >= DS_DOMAIN_FUNCTION_2003
# and missing otherwise
(class_name, class_ldap_name, class_dn) = self._make_obj_names("msDS-IntId-Class-3-")
ldif = self._make_class_ldif(class_dn, class_name)
@@ -469,7 +469,7 @@ systemOnly: FALSE
attrs=["systemFlags", "msDS-IntId", "attributeID", "cn"])
self.assertTrue(len(res) > 1)
for ldb_msg in res:
- if self.forest_level >= DS_DC_FUNCTION_2003:
+ if self.forest_level >= DS_DOMAIN_FUNCTION_2003:
if self._is_schema_base_object(ldb_msg):
self.assertTrue("msDS-IntId" not in ldb_msg)
else:
diff --git a/source4/libnet/libnet_become_dc.c b/source4/libnet/libnet_become_dc.c
index d64e415f8cc..25a216524e4 100644
--- a/source4/libnet/libnet_become_dc.c
+++ b/source4/libnet/libnet_become_dc.c
@@ -741,7 +741,7 @@ static int32_t get_dc_function_level(struct loadparm_context *lp_ctx)
{
/* per default we are (Windows) 2008 compatible */
return lp_parm_int(lp_ctx, NULL, "ads", "dc function level",
- DS_DC_FUNCTION_2008);
+ DS_DOMAIN_FUNCTION_2008);
}
static void becomeDC_recv_cldap(struct tevent_req *req);
diff --git a/source4/scripting/python/samba/netcmd/domainlevel.py b/source4/scripting/python/samba/netcmd/domainlevel.py
index 4278ae5e4aa..69e0afb6007 100644
--- a/source4/scripting/python/samba/netcmd/domainlevel.py
+++ b/source4/scripting/python/samba/netcmd/domainlevel.py
@@ -40,10 +40,6 @@ from samba.dsdb import (
DS_DOMAIN_FUNCTION_2003_MIXED,
DS_DOMAIN_FUNCTION_2008,
DS_DOMAIN_FUNCTION_2008_R2,
- DS_DC_FUNCTION_2000,
- DS_DC_FUNCTION_2003,
- DS_DC_FUNCTION_2008,
- DS_DC_FUNCTION_2008_R2,
)
class cmd_domainlevel(Command):
@@ -119,7 +115,7 @@ class cmd_domainlevel(Command):
self.message("\nATTENTION: You run SAMBA 4 on a forest function level lower than Windows 2003 (Native). This isn't supported! Please raise!")
if level_domain < DS_DOMAIN_FUNCTION_2003:
self.message("\nATTENTION: You run SAMBA 4 on a domain function level lower than Windows 2003 (Native). This isn't supported! Please raise!")
- if min_level_dc < DS_DC_FUNCTION_2003:
+ if min_level_dc < DS_DOMAIN_FUNCTION_2003:
self.message("\nATTENTION: You run SAMBA 4 on a lowest function level of a DC lower than Windows 2003. This isn't supported! Please step-up or upgrade the concerning DC(s)!")
self.message("")
@@ -154,13 +150,13 @@ class cmd_domainlevel(Command):
outstr = "higher than 2008 R2"
self.message("Domain function level: (Windows) " + outstr)
- if min_level_dc == DS_DC_FUNCTION_2000:
+ if min_level_dc == DS_DOMAIN_FUNCTION_2000:
outstr = "2000"
- elif min_level_dc == DS_DC_FUNCTION_2003:
+ elif min_level_dc == DS_DOMAIN_FUNCTION_2003:
outstr = "2003"
- elif min_level_dc == DS_DC_FUNCTION_2008:
+ elif min_level_dc == DS_DOMAIN_FUNCTION_2008:
outstr = "2008"
- elif min_level_dc == DS_DC_FUNCTION_2008_R2:
+ elif min_level_dc == DS_DOMAIN_FUNCTION_2008_R2:
outstr = "2008 R2"
else:
outstr = "higher than 2008 R2"
diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py
index cfba780baf1..1b7cfca64d4 100644
--- a/source4/scripting/python/samba/provision.py
+++ b/source4/scripting/python/samba/provision.py
@@ -43,7 +43,7 @@ from samba.auth import system_session, admin_session
import samba
from samba import version, Ldb, substitute_var, valid_netbios_name
from samba import check_all_substituted, read_and_sub_file, setup_file
-from samba.dsdb import DS_DOMAIN_FUNCTION_2003, DS_DC_FUNCTION_2008
+from samba.dsdb import DS_DOMAIN_FUNCTION_2003, DS_DOMAIN_FUNCTION_2008
from samba.dcerpc import security
from samba.dcerpc.misc import SEC_CHAN_BDC, SEC_CHAN_WKSTA
from samba.idmap import IDmapDB
@@ -955,7 +955,7 @@ def setup_samdb(path, setup_path, session_info, provision_backend, lp, names,
# ATTENTION: Do NOT change these default values without discussion with the
# team and/or release manager. They have a big impact on the whole program!
- domainControllerFunctionality = DS_DC_FUNCTION_2008
+ domainControllerFunctionality = DS_DOMAIN_FUNCTION_2008
if dom_for_fun_level is None:
dom_for_fun_level = DS_DOMAIN_FUNCTION_2003