summaryrefslogtreecommitdiff
path: root/packages/net-fs/samba/files/a222b7506b53e689708834237f18877231dca589.patch
blob: 8bcbf3d54080c9858598b4ece4d8ec872727b01e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
From a222b7506b53e689708834237f18877231dca589 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl@samba.org>
Date: Sat, 3 Feb 2018 07:07:55 +0100
Upstream: yes, in master
Subject: [PATCH] libgpo: Fix the build --without-ads

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>

Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Tue Feb  6 15:36:01 CET 2018 on sn-devel-144
---
 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 @@ static PyObject *py_ads_get_gpo_list(ADS *self, PyObject *args, PyObject *kwds)
 	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 }
 };