1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

lib:cmdline: Load network interfaces in _samba_cmdline_load_config_s4()

This makes the samba.tests.domain_backup tests start working again when
they are run standalone. Without the load_interfaces() call,
smb_sysvol_conn() fails to make a connection to the sysvol share.

Signed-off-by: Jo Sutton <josutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
Jo Sutton 2024-07-30 16:55:17 +12:00 committed by Douglas Bagnall
parent 58b4d988fa
commit bf8a22b2e4
2 changed files with 12 additions and 1 deletions

View File

@ -20,9 +20,11 @@
#include "lib/param/param.h"
#include "lib/util/debug.h"
#include "lib/util/fault.h"
#include "lib/util/talloc_stack.h"
#include "auth/credentials/credentials.h"
#include "dynconfig/dynconfig.h"
#include "cmdline_private.h"
#include "source3/lib/interface.h"
static bool _require_smbconf;
static enum samba_cmdline_config_type _config_type;
@ -82,6 +84,15 @@ static bool _samba_cmdline_load_config_s4(void)
break;
}
{
/* load_interfaces() requires a talloc stackframe. */
TALLOC_CTX *frame = talloc_stackframe();
load_interfaces();
TALLOC_FREE(frame);
}
return true;
}

View File

@ -26,7 +26,7 @@ def build(bld):
bld.SAMBA_SUBSYSTEM('CMDLINE_S4',
source='cmdline_s4.c',
deps='cmdline')
deps='cmdline samba3core')
bld.SAMBA_BINARY('test_cmdline',
source='tests/test_cmdline.c',