summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2011-04-04 13:20:19 +0200
committerGünther Deschner <gd@samba.org>2011-04-06 11:53:56 +0200
commitc47df017dda71f9eecea74575c7d7292e543e5ec (patch)
treeca6c7ba451d3a80779d2edb6464fc5ed91a2f59d
parentca22befb9c2f4bf96944fc70650435dc11b4ea3a (diff)
downloadsamba-c47df017dda71f9eecea74575c7d7292e543e5ec.tar.gz
samba-c47df017dda71f9eecea74575c7d7292e543e5ec.tar.bz2
samba-c47df017dda71f9eecea74575c7d7292e543e5ec.zip
s3-pdb_ipa: Detect IPA server
Signed-off-by: Günther Deschner <gd@samba.org>
-rw-r--r--source3/passdb/pdb_ipa.c8
1 files changed, 7 insertions, 1 deletions
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;