samba-4.7.4 make without ads

Volker Lendecke Volker.Lendecke at SerNet.DE
Sat Feb 3 06:10:10 UTC 2018


On Wed, Jan 31, 2018 at 09:59:58PM +0100, Heiko L.  via samba-technical wrote:
>   Build failed:  -> task failed (err #1):
>         {task: cc_link ldap_63.o,sasl_63.o,sasl_wrapping_63.o,krb5_setpw_63o,kerberos_util_63.o,ldap_user_63.o,ads_struct_63.o,kerberos_keytab_63.o,disp_sec_63.o,ldap_utils_63.o,ldap_schema_63.o,util_63.o,ndr_63.o,namequery_dc_104.o,trustdom_cache_104.o,dsgetdcname_104.o -> libads-samba4.so}
>   make: *** [all] Error 1
> 
> 
> 
> What did I do wrong?

Can you try the attached patch? The second of the two might not apply,
but the first one should.

Thanks,

Volker

-- 
Besuchen Sie die verinice.XP 2018 in Berlin,
Anwenderkonferenz für Informationssicherheit
vom 21.-23.03.2018 im Sofitel Kurfürstendamm
Info & Anmeldung hier: http://veriniceXP.org

SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
From 8f075f5d4a24de27a39d1c5550b47d5a1f5ff22b Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Sat, 3 Feb 2018 07:07:24 +0100
Subject: [PATCH 1/2] libads: Fix the build --without-ads

Signed-off-by: Volker Lendecke <vl at samba.org>
---
 source3/libads/kerberos_keytab.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/source3/libads/kerberos_keytab.c b/source3/libads/kerberos_keytab.c
index ffd100c5636..37ac7ba985e 100644
--- a/source3/libads/kerberos_keytab.c
+++ b/source3/libads/kerberos_keytab.c
@@ -640,7 +640,11 @@ int ads_keytab_list(const char *keytab_name)
 	}
 
 	if (keytab_name == NULL) {
+#ifdef HAVE_ADS
 		ret = ads_keytab_open(context, &keytab);
+#else
+		ret = ENOENT;
+#endif
 	} else {
 		ret = smb_krb5_kt_open(context, keytab_name, False, &keytab);
 	}
-- 
2.11.0


From b501e3b4eaad277cd0c61c1cbe1dc24dc4ec5616 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Sat, 3 Feb 2018 07:07:55 +0100
Subject: [PATCH 2/2] libgpo: Fix the build --without-ads

Signed-off-by: Volker Lendecke <vl at samba.org>
---
 libgpo/pygpo.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libgpo/pygpo.c b/libgpo/pygpo.c
index 7a02a0dc2aa..b6b53b76212 100644
--- a/libgpo/pygpo.c
+++ b/libgpo/pygpo.c
@@ -319,6 +319,7 @@ static PyObject *py_gpo_get_sysvol_gpt_version(PyObject * self,
 	return result;
 }
 
+#ifdef HAVE_ADS
 static ADS_STATUS find_samaccount(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx,
 				  const char *samaccountname,
 				  uint32_t *uac_ret, const char **dn_ret)
@@ -468,11 +469,15 @@ out:
 	return ret;
 }
 
+#endif
+
 static PyMethodDef ADS_methods[] = {
 	{ "connect", (PyCFunction)py_ads_connect, METH_NOARGS,
 		"Connect to the LDAP server" },
+#ifdef HAVE_ADS
 	{ "get_gpo_list", (PyCFunction)py_ads_get_gpo_list, METH_KEYWORDS,
 		NULL },
+#endif
 	{ NULL }
 };
 
-- 
2.11.0



More information about the samba-technical mailing list