From c6fb6dbdfc3084c870714a8782d2bf89d8aec209 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Wed, 6 Apr 2016 15:26:15 +0200 Subject: AD: Recognize Windows Server 2016 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Even though at this time the MSDN documentation at: https://msdn.microsoft.com/en-us/library/cc223272.aspx still claims that "7" is a value of DS_BEHAVIOR_WINTHRESHOLD, testing with Windows Server 2016 Preview already shows that server reporting a new value of Domain Controller Functionality. Reviewed-by: Lukáš Slebodník --- src/providers/ldap/sdap.c | 6 ++++-- src/providers/ldap/sdap.h | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/providers/ldap/sdap.c b/src/providers/ldap/sdap.c index 888cbb509..686f72666 100644 --- a/src/providers/ldap/sdap.c +++ b/src/providers/ldap/sdap.c @@ -1347,6 +1347,7 @@ int sdap_get_server_opts_from_rootdse(TALLOC_CTX *memctx, case DS_BEHAVIOR_WIN2008R2: case DS_BEHAVIOR_WIN2012: case DS_BEHAVIOR_WIN2012R2: + case DS_BEHAVIOR_WIN2016: opts->dc_functional_level = dc_level; DEBUG(SSSDBG_CONF_SETTINGS, "Setting AD compatibility level to [%d]\n", @@ -1354,8 +1355,9 @@ int sdap_get_server_opts_from_rootdse(TALLOC_CTX *memctx, break; default: DEBUG(SSSDBG_MINOR_FAILURE, - "Received invalid value for AD compatibility level. " - "Using the lowest-common compatibility level\n"); + "Received invalid value [%d] for AD compatibility level. " + "Using the lowest-common compatibility level\n", + dc_level); opts->dc_functional_level = DS_BEHAVIOR_WIN2003; } } else if (ret != ENOENT) { diff --git a/src/providers/ldap/sdap.h b/src/providers/ldap/sdap.h index 44b8cfb1c..10c8ff6e0 100644 --- a/src/providers/ldap/sdap.h +++ b/src/providers/ldap/sdap.h @@ -391,7 +391,8 @@ enum dc_functional_level { DS_BEHAVIOR_WIN2008 = 3, DS_BEHAVIOR_WIN2008R2 = 4, DS_BEHAVIOR_WIN2012 = 5, - DS_BEHAVIOR_WIN2012R2 = 6 + DS_BEHAVIOR_WIN2012R2 = 6, + DS_BEHAVIOR_WIN2016 = 7, }; struct sdap_domain { -- cgit