idmap_rfc2307: Fix handling of cn realm
authorChristof Schmitt <cs@samba.org>
Tue, 8 Dec 2015 18:52:41 +0000 (11:52 -0700)
committerVolker Lendecke <vl@samba.org>
Mon, 14 Dec 2015 11:37:08 +0000 (12:37 +0100)
commit7cd99b42075f09ee297569f1d030048c9e887d50
tree1626dcc11bb986beba58af4eed72067dd437fdd9
parentb36c6214f02d99c758395cb93e67ca2eda8b83a7
idmap_rfc2307: Fix handling of cn realm

When cn_realm was set, the idmap_rfc2307 module tried to determine the
realm from the AD connection struct. In case of referring to a different
domain using the ldap_domain config option, the wrong realm was used.

Since the LDAP-server case already requires having the realm in the
config, extend that to the AD case to fix the issue: Having LDAP records
with @realm in the cn, now always requires having the realm in the
config.

Now cn_realm and ldap_realm always would have to be specified together,
so replace the two options with a single "realm" option.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/winbindd/idmap_rfc2307.c