]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
samba-tool: Enable samba-tool without ad dc (but with ads)
authorDavid Mulder <dmulder@suse.com>
Thu, 17 Sep 2020 19:26:18 +0000 (13:26 -0600)
committerAndrew Bartlett <abartlet@samba.org>
Sun, 20 Jun 2021 22:06:36 +0000 (22:06 +0000)
Much of samba-tool can operate without the full AD DC,
for remote operations.

However the samba-tool gpo command depends on ads being
built. Without ads, every samba-tool command
crashes because ads imports fail.

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/scripting/bin/wscript_build
source4/scripting/wscript_build

index 87d23545487a9e56caceca1cbed739097ad4d619..d31afb2f13266e46cf218af8177511b451041347 100644 (file)
@@ -1,8 +1,7 @@
 #!/usr/bin/env python3
 
 if bld.CONFIG_SET('AD_DC_BUILD_IS_ENABLED'):
-    for script in ['samba-tool',
-                   'samba_dnsupdate',
+    for script in ['samba_dnsupdate',
                    'samba_spnupdate',
                    'samba_kcc',
                    'samba_upgradeprovision',
@@ -10,4 +9,6 @@ if bld.CONFIG_SET('AD_DC_BUILD_IS_ENABLED'):
                    'gen_output.py',
                    'samba_downgrade_db']:
         bld.SAMBA_SCRIPT(script, pattern=script, installdir='.')
+if bld.CONFIG_SET('WITH_ADS'):
+    bld.SAMBA_SCRIPT('samba-tool', pattern='samba-tool', installdir='.')
 bld.SAMBA_SCRIPT('samba-gpupdate', pattern='samba-gpupdate', installdir='.')
index c5883f1fc8cfe840197d044a10c089fe5343ae40..6728dec998e365e6286f855cb512e971109302f2 100644 (file)
@@ -16,7 +16,7 @@ if sbin_files:
     if 'XSLTPROC_MANPAGES' in bld.env and bld.env['XSLTPROC_MANPAGES']:
         bld.MANPAGES(man_files, True)
 
-if bld.CONFIG_SET('AD_DC_BUILD_IS_ENABLED'):
+if bld.CONFIG_SET('WITH_ADS'):
     bld.INSTALL_FILES('${BINDIR}',
                   'bin/samba-tool',
                   chmod=MODE_755, python_fixup=True, flat=True)