mirror of
https://github.com/samba-team/samba.git
synced 2025-08-02 00:22:11 +03:00
s4-ipv6: update callers to load_interface_list()
This commit is contained in:
@ -357,7 +357,7 @@ int main(int argc, const char *argv[])
|
||||
exit(1);
|
||||
}
|
||||
|
||||
load_interface_list(NULL, lpcfg_interfaces(cmdline_lp_ctx), &ifaces);
|
||||
load_interface_list(NULL, cmdline_lp_ctx, &ifaces);
|
||||
|
||||
ev = s4_event_context_init(talloc_autofree_context());
|
||||
|
||||
|
@ -189,7 +189,7 @@ static void cldapd_task_init(struct task_server *task)
|
||||
NTSTATUS status;
|
||||
struct interface *ifaces;
|
||||
|
||||
load_interface_list(task, lpcfg_interfaces(task->lp_ctx), &ifaces);
|
||||
load_interface_list(task, task->lp_ctx, &ifaces);
|
||||
|
||||
if (iface_list_count(ifaces) == 0) {
|
||||
task_server_terminate(task, "cldapd: no network interfaces configured", false);
|
||||
|
@ -291,7 +291,7 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx,
|
||||
client_site = samdb_client_site_name(sam_ctx, mem_ctx,
|
||||
src_address, NULL);
|
||||
NT_STATUS_HAVE_NO_MEMORY(client_site);
|
||||
load_interface_list(mem_ctx, lpcfg_interfaces(lp_ctx), &ifaces);
|
||||
load_interface_list(mem_ctx, lp_ctx, &ifaces);
|
||||
/*
|
||||
* TODO: the caller should pass the address which the client
|
||||
* used to trigger this call, as the client is able to reach
|
||||
|
@ -617,7 +617,7 @@ static void dns_task_init(struct task_server *task)
|
||||
break;
|
||||
}
|
||||
|
||||
load_interface_list(task, lpcfg_interfaces(task->lp_ctx), &ifaces);
|
||||
load_interface_list(task, task->lp_ctx, &ifaces);
|
||||
|
||||
if (iface_list_count(ifaces) == 0) {
|
||||
task_server_terminate(task, "dns: no network interfaces configured", false);
|
||||
|
@ -308,7 +308,7 @@ static void echo_task_init(struct task_server *task)
|
||||
break;
|
||||
}
|
||||
|
||||
load_interface_list(task, lpcfg_interfaces(task->lp_ctx), &ifaces);
|
||||
load_interface_list(task, task->lp_ctx, &ifaces);
|
||||
|
||||
if (iface_list_count(ifaces) == 0) {
|
||||
task_server_terminate(task,
|
||||
|
@ -900,7 +900,7 @@ static void kdc_task_init(struct task_server *task)
|
||||
break;
|
||||
}
|
||||
|
||||
load_interface_list(task, lpcfg_interfaces(task->lp_ctx), &ifaces);
|
||||
load_interface_list(task, task->lp_ctx, &ifaces);
|
||||
|
||||
if (iface_list_count(ifaces) == 0) {
|
||||
task_server_terminate(task, "kdc: no network interfaces configured", false);
|
||||
|
@ -951,7 +951,7 @@ static void ldapsrv_task_init(struct task_server *task)
|
||||
int num_interfaces;
|
||||
int i;
|
||||
|
||||
load_interface_list(task, lpcfg_interfaces(task->lp_ctx), &ifaces);
|
||||
load_interface_list(task, task->lp_ctx, &ifaces);
|
||||
num_interfaces = iface_list_count(ifaces);
|
||||
|
||||
/* We have been given an interfaces line, and been
|
||||
|
@ -42,7 +42,7 @@ static bool test_udp(struct torture_context *tctx)
|
||||
TALLOC_CTX *mem_ctx = tctx;
|
||||
struct interface *ifaces;
|
||||
|
||||
load_interface_list(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
|
||||
load_interface_list(tctx, tctx->lp_ctx, &ifaces);
|
||||
|
||||
status = socket_create("ip", SOCKET_TYPE_DGRAM, &sock1, 0);
|
||||
torture_assert_ntstatus_ok(tctx, status, "creating DGRAM IP socket 1");
|
||||
@ -135,7 +135,7 @@ static bool test_tcp(struct torture_context *tctx)
|
||||
torture_assert_ntstatus_ok(tctx, status, "creating IP stream socket 1");
|
||||
talloc_steal(mem_ctx, sock2);
|
||||
|
||||
load_interface_list(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
|
||||
load_interface_list(tctx, tctx->lp_ctx, &ifaces);
|
||||
localhost = socket_address_from_strings(sock1, sock1->backend_name,
|
||||
iface_list_best_ip(ifaces, "127.0.0.1"), 0);
|
||||
torture_assert(tctx, localhost, "Localhost not found");
|
||||
|
@ -101,6 +101,6 @@ bool resolve_context_add_bcast_method(struct resolve_context *ctx, struct interf
|
||||
bool resolve_context_add_bcast_method_lp(struct resolve_context *ctx, struct loadparm_context *lp_ctx)
|
||||
{
|
||||
struct interface *ifaces;
|
||||
load_interface_list(ctx, lpcfg_interfaces(lp_ctx), &ifaces);
|
||||
load_interface_list(ctx, lp_ctx, &ifaces);
|
||||
return resolve_context_add_bcast_method(ctx, ifaces, lpcfg_nbt_port(lp_ctx), lpcfg_parm_int(lp_ctx, NULL, "nbt", "timeout", 1));
|
||||
}
|
||||
|
@ -77,6 +77,6 @@ bool resolve_context_add_wins_method(struct resolve_context *ctx, const char **a
|
||||
bool resolve_context_add_wins_method_lp(struct resolve_context *ctx, struct loadparm_context *lp_ctx)
|
||||
{
|
||||
struct interface *ifaces;
|
||||
load_interface_list(ctx, lpcfg_interfaces(lp_ctx), &ifaces);
|
||||
load_interface_list(ctx, lp_ctx, &ifaces);
|
||||
return resolve_context_add_wins_method(ctx, lpcfg_wins_server_list(lp_ctx), ifaces, lpcfg_nbt_port(lp_ctx), lpcfg_parm_int(lp_ctx, NULL, "nbt", "timeout", 1));
|
||||
}
|
||||
|
@ -136,7 +136,7 @@ NTSTATUS wrepl_socket_split_stream(struct wrepl_socket *wrepl_socket,
|
||||
const char *wrepl_best_ip(struct loadparm_context *lp_ctx, const char *peer_ip)
|
||||
{
|
||||
struct interface *ifaces;
|
||||
load_interface_list(lp_ctx, lpcfg_interfaces(lp_ctx), &ifaces);
|
||||
load_interface_list(lp_ctx, lp_ctx, &ifaces);
|
||||
return iface_list_best_ip(ifaces, peer_ip);
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ static void nbtd_task_init(struct task_server *task)
|
||||
NTSTATUS status;
|
||||
struct interface *ifaces;
|
||||
|
||||
load_interface_list(task, lpcfg_interfaces(task->lp_ctx), &ifaces);
|
||||
load_interface_list(task, task->lp_ctx, &ifaces);
|
||||
|
||||
if (iface_list_count(ifaces) == 0) {
|
||||
task_server_terminate(task, "nbtd: no network interfaces configured", false);
|
||||
|
@ -92,7 +92,7 @@ static int wins_ldb_init(struct ldb_module *module)
|
||||
owner = lpcfg_parm_string(lp_ctx, NULL, "winsdb", "local_owner");
|
||||
if (!owner) {
|
||||
struct interface *ifaces;
|
||||
load_interface_list(module, lpcfg_interfaces(lp_ctx), &ifaces);
|
||||
load_interface_list(module, lp_ctx, &ifaces);
|
||||
owner = iface_list_n_ip(ifaces, 0);
|
||||
if (!owner) {
|
||||
owner = "0.0.0.0";
|
||||
|
@ -1057,7 +1057,7 @@ NTSTATUS nbtd_winsserver_init(struct nbtd_server *nbtsrv)
|
||||
|
||||
if (owner == NULL) {
|
||||
struct interface *ifaces;
|
||||
load_interface_list(nbtsrv->task, lpcfg_interfaces(nbtsrv->task->lp_ctx), &ifaces);
|
||||
load_interface_list(nbtsrv->task, nbtsrv->task->lp_ctx, &ifaces);
|
||||
owner = iface_list_n_ip(ifaces, 0);
|
||||
}
|
||||
|
||||
|
@ -1678,7 +1678,7 @@ static NTSTATUS dcesrv_add_ep_tcp(struct dcesrv_context *dce_ctx,
|
||||
int i;
|
||||
struct interface *ifaces;
|
||||
|
||||
load_interface_list(dce_ctx, lpcfg_interfaces(lp_ctx), &ifaces);
|
||||
load_interface_list(dce_ctx, lp_ctx, &ifaces);
|
||||
|
||||
num_interfaces = iface_list_count(ifaces);
|
||||
for(i = 0; i < num_interfaces; i++) {
|
||||
|
@ -153,7 +153,7 @@ static PyObject *py_interface_ips(PyObject *self, PyObject *args)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
load_interface_list(tmp_ctx, lpcfg_interfaces(lp_ctx), &ifaces);
|
||||
load_interface_list(tmp_ctx, lp_ctx, &ifaces);
|
||||
|
||||
count = iface_list_count(ifaces);
|
||||
|
||||
|
@ -48,7 +48,7 @@ static void smbsrv_task_init(struct task_server *task)
|
||||
int i;
|
||||
struct interface *ifaces;
|
||||
|
||||
load_interface_list(task, lpcfg_interfaces(task->lp_ctx), &ifaces);
|
||||
load_interface_list(task, task->lp_ctx, &ifaces);
|
||||
|
||||
num_interfaces = iface_list_count(ifaces);
|
||||
|
||||
|
@ -135,7 +135,7 @@ static void samba3_smb_task_init(struct task_server *task)
|
||||
int i;
|
||||
struct interface *ifaces;
|
||||
|
||||
load_interface_list(task, lpcfg_interfaces(task->lp_ctx), &ifaces);
|
||||
load_interface_list(task, task->lp_ctx, &ifaces);
|
||||
|
||||
num_interfaces = iface_list_count(ifaces);
|
||||
|
||||
|
@ -91,7 +91,7 @@ static bool nbt_test_netlogon(struct torture_context *tctx)
|
||||
&name, tctx, &address, tctx->ev),
|
||||
talloc_asprintf(tctx, "Failed to resolve %s", name.name));
|
||||
|
||||
load_interface_list(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
|
||||
load_interface_list(tctx, tctx->lp_ctx, &ifaces);
|
||||
myaddress = talloc_strdup(dgmsock, iface_list_best_ip(ifaces, address));
|
||||
|
||||
|
||||
@ -187,7 +187,7 @@ static bool nbt_test_netlogon2(struct torture_context *tctx)
|
||||
&name, tctx, &address, tctx->ev),
|
||||
talloc_asprintf(tctx, "Failed to resolve %s", name.name));
|
||||
|
||||
load_interface_list(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
|
||||
load_interface_list(tctx, tctx->lp_ctx, &ifaces);
|
||||
myaddress = talloc_strdup(dgmsock, iface_list_best_ip(ifaces, address));
|
||||
|
||||
socket_address = socket_address_from_strings(dgmsock, dgmsock->sock->backend_name,
|
||||
@ -458,7 +458,7 @@ static bool nbt_test_ntlogon(struct torture_context *tctx)
|
||||
0, 0, &name, tctx, &address, tctx->ev),
|
||||
talloc_asprintf(tctx, "Failed to resolve %s", name.name));
|
||||
|
||||
load_interface_list(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
|
||||
load_interface_list(tctx, tctx->lp_ctx, &ifaces);
|
||||
myaddress = talloc_strdup(dgmsock, iface_list_best_ip(ifaces, address));
|
||||
|
||||
socket_address = socket_address_from_strings(dgmsock, dgmsock->sock->backend_name,
|
||||
|
@ -54,7 +54,7 @@ static bool nbt_register_own(struct torture_context *tctx)
|
||||
if (!torture_nbt_get_name(tctx, &name, &address))
|
||||
return false;
|
||||
|
||||
load_interface_list(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
|
||||
load_interface_list(tctx, tctx->lp_ctx, &ifaces);
|
||||
|
||||
myaddress = iface_list_best_ip(ifaces, address);
|
||||
|
||||
@ -123,7 +123,7 @@ static bool nbt_refresh_own(struct torture_context *tctx)
|
||||
if (!torture_nbt_get_name(tctx, &name, &address))
|
||||
return false;
|
||||
|
||||
load_interface_list(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
|
||||
load_interface_list(tctx, tctx->lp_ctx, &ifaces);
|
||||
|
||||
myaddress = iface_list_best_ip(ifaces, address);
|
||||
|
||||
|
@ -65,7 +65,7 @@ static bool nbt_test_wins_name(struct torture_context *tctx, const char *address
|
||||
struct interface *ifaces;
|
||||
bool low_port = try_low_port;
|
||||
|
||||
load_interface_list(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
|
||||
load_interface_list(tctx, tctx->lp_ctx, &ifaces);
|
||||
|
||||
myaddress = talloc_strdup(tctx, iface_list_best_ip(ifaces, address));
|
||||
|
||||
|
@ -246,7 +246,7 @@ static bool bench_wins(struct torture_context *tctx)
|
||||
state->registered = talloc_zero_array(state, bool, state->num_names);
|
||||
state->wins_server = address;
|
||||
state->wins_port = lpcfg_nbt_port(tctx->lp_ctx);
|
||||
load_interface_list(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
|
||||
load_interface_list(tctx, tctx->lp_ctx, &ifaces);
|
||||
state->my_ip = talloc_strdup(tctx, iface_list_best_ip(ifaces, address));
|
||||
state->ttl = timelimit;
|
||||
|
||||
|
@ -615,7 +615,7 @@ static struct test_wrepl_conflict_conn *test_create_conflict_ctx(
|
||||
ctx->nbtsock = nbt_name_socket_init(ctx, tctx->ev);
|
||||
if (!ctx->nbtsock) return NULL;
|
||||
|
||||
load_interface_list(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
|
||||
load_interface_list(tctx, tctx->lp_ctx, &ifaces);
|
||||
|
||||
ctx->myaddr = socket_address_from_strings(tctx, ctx->nbtsock->sock->backend_name, iface_list_best_ip(ifaces, address), 0);
|
||||
if (!ctx->myaddr) return NULL;
|
||||
|
@ -455,7 +455,7 @@ static bool test_start_dcerpc_server(struct torture_context *tctx,
|
||||
|
||||
lpcfg_set_cmdline(tctx->lp_ctx, "dcerpc endpoint servers", "spoolss");
|
||||
|
||||
load_interface_list(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
|
||||
load_interface_list(tctx, tctx->lp_ctx, &ifaces);
|
||||
address = iface_list_n_ip(ifaces, 0);
|
||||
|
||||
torture_comment(tctx, "Listening for callbacks on %s\n", address);
|
||||
|
@ -319,7 +319,7 @@ static void websrv_task_init(struct task_server *task)
|
||||
int i;
|
||||
struct interface *ifaces;
|
||||
|
||||
load_interface_list(NULL, lpcfg_interfaces(task->lp_ctx), &ifaces);
|
||||
load_interface_list(NULL, task->lp_ctx, &ifaces);
|
||||
|
||||
num_interfaces = iface_list_count(ifaces);
|
||||
for(i = 0; i < num_interfaces; i++) {
|
||||
|
@ -441,7 +441,7 @@ NTSTATUS wreplsrv_setup_sockets(struct wreplsrv_service *service, struct loadpar
|
||||
int i;
|
||||
struct interface *ifaces;
|
||||
|
||||
load_interface_list(task, lpcfg_interfaces(lp_ctx), &ifaces);
|
||||
load_interface_list(task, lp_ctx, &ifaces);
|
||||
|
||||
num_interfaces = iface_list_count(ifaces);
|
||||
|
||||
|
@ -78,7 +78,7 @@ static NTSTATUS wreplsrv_open_winsdb(struct wreplsrv_service *service,
|
||||
|
||||
if (owner == NULL) {
|
||||
struct interface *ifaces;
|
||||
load_interface_list(service, lpcfg_interfaces(lp_ctx), &ifaces);
|
||||
load_interface_list(service, lp_ctx, &ifaces);
|
||||
owner = iface_list_n_ip(ifaces, 0);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user