From 1824e16f288a3e0545f6c3d71455b6ee507ace2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Sun, 23 May 2004 21:33:26 +0000 Subject: [PATCH] make samba forwarding a runtime configure option git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13859 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/hdb/hdb-ldap.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/hdb/hdb-ldap.c b/lib/hdb/hdb-ldap.c index ac4a01355..5bd1cce52 100644 --- a/lib/hdb/hdb-ldap.c +++ b/lib/hdb/hdb-ldap.c @@ -52,6 +52,7 @@ LDAP_message2entry(krb5_context context, HDB * db, LDAPMessage * msg, static const char *default_structural_object = "account"; static char *structural_object; +static int samba_forwardable; /* * @@ -1204,7 +1205,8 @@ LDAP_message2entry(krb5_context context, HDB * db, LDAPMessage * msg, goto out2; /* Allow forwarding */ - ent->flags.forwardable = TRUE; + if (samba_forwardable) + ent->flags.forwardable = TRUE; for (i=0; i < flags_len; i++) { switch (samba_acct_flags[i]) { @@ -1673,6 +1675,10 @@ hdb_ldap_create(krb5_context context, HDB ** db, const char *arg) } } + samba_forwardable = + krb5_config_get_bool_default(context, NULL, TRUE, + "kdc", "hdb-samba-forwardable", NULL); + *db = malloc(sizeof(**db)); if (*db == NULL) { krb5_set_error_string(context, "malloc: out of memory");