From 9aef045b2719e85fa2ede826b0b4fa2e592eab02 Mon Sep 17 00:00:00 2001 From: Rafal Szczesniak Date: Sun, 20 Nov 2005 21:40:41 +0000 Subject: r11814: 1) Set name resolution methods according to smb.conf 2) Set credentials workstation name, otherwise rpc bind function segfaults on auth stage rafal (This used to be commit 6dc67ba6a30e6fc3fc21821d009ea940b093eec2) --- source4/scripting/ejs/ejsnet.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source4') diff --git a/source4/scripting/ejs/ejsnet.c b/source4/scripting/ejs/ejsnet.c index 82e0eb81fe..5768fb4442 100644 --- a/source4/scripting/ejs/ejsnet.c +++ b/source4/scripting/ejs/ejsnet.c @@ -36,12 +36,15 @@ static int ejs_net_context(MprVarHandle eid, int argc, struct MprVar **argv) ctx = libnet_context_init(NULL); creds = talloc(ctx, struct cli_credentials); ctx->cred = creds; - ctx->name_res_methods = lp_name_resolve_order(); + + ctx->name_res_methods = str_list_copy(ctx, lp_name_resolve_order()); if (argc == 0) { cli_credentials_set_anonymous(creds); } else if (argc == 2 || argc == 4 ) { + + cli_credentials_set_workstation(creds, lp_netbios_name(), CRED_SPECIFIED); if (!mprVarIsString(argv[0]->type)) { ejsSetErrorMsg(eid, "argument 1 must be a string"); -- cgit