From c47df017dda71f9eecea74575c7d7292e543e5ec Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Mon, 4 Apr 2011 13:20:19 +0200 Subject: s3-pdb_ipa: Detect IPA server MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Günther Deschner --- source3/passdb/pdb_ipa.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source3/passdb/pdb_ipa.c') diff --git a/source3/passdb/pdb_ipa.c b/source3/passdb/pdb_ipa.c index 2024181c5d..636a6b3423 100644 --- a/source3/passdb/pdb_ipa.c +++ b/source3/passdb/pdb_ipa.c @@ -25,6 +25,8 @@ #include "smbldap.h" +#define IPA_KEYTAB_SET_OID "2.16.840.1.113730.3.8.3.1" + #define LDAP_TRUST_CONTAINER "ou=system" #define LDAP_ATTRIBUTE_CN "cn" #define LDAP_ATTRIBUTE_TRUST_TYPE "sambaTrustType" @@ -42,6 +44,7 @@ #define LDAP_ATTRIBUTE_KRB_PRINCIPAL "krbPrincipalName" struct ipasam_privates { + bool server_is_ipa; NTSTATUS (*ldapsam_add_sam_account)(struct pdb_methods *, struct samu *sampass); NTSTATUS (*ldapsam_update_sam_account)(struct pdb_methods *, @@ -908,7 +911,10 @@ static NTSTATUS pdb_init_IPA_ldapsam(struct pdb_methods **pdb_method, const char if (ldap_state->ipasam_privates == NULL) { return NT_STATUS_NO_MEMORY; } - ldap_state->is_ipa_ldap = true; + ldap_state->is_ipa_ldap = True; + + ldap_state->ipasam_privates->server_is_ipa = smbldap_has_extension( + priv2ld(ldap_state), IPA_KEYTAB_SET_OID); ldap_state->ipasam_privates->ldapsam_add_sam_account = (*pdb_method)->add_sam_account; ldap_state->ipasam_privates->ldapsam_update_sam_account = (*pdb_method)->update_sam_account; -- cgit