libgpo: Fix the build --without-ads
authorVolker Lendecke <vl@samba.org>
Sat, 3 Feb 2018 06:07:55 +0000 (07:07 +0100)
committerDavid Disseldorp <ddiss@samba.org>
Tue, 6 Feb 2018 14:36:01 +0000 (15:36 +0100)
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

index 7a02a0dc2aa1acbb1e1eb1b2e7152beeb6f18fc7..b6b53b762127a0d9dff6aaf0e2e3d7542b7780a5 100644 (file)
@@ -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 }
 };