Author: mimir Date: 2005-11-20 21:40:41 +0000 (Sun, 20 Nov 2005) New Revision: 11814
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=11814 Log: 1) Set name resolution methods according to smb.conf 2) Set credentials workstation name, otherwise rpc bind function segfaults on auth stage rafal Modified: branches/SAMBA_4_0/source/scripting/ejs/ejsnet.c Changeset: Modified: branches/SAMBA_4_0/source/scripting/ejs/ejsnet.c =================================================================== --- branches/SAMBA_4_0/source/scripting/ejs/ejsnet.c 2005-11-20 21:33:30 UTC (rev 11813) +++ branches/SAMBA_4_0/source/scripting/ejs/ejsnet.c 2005-11-20 21:40:41 UTC (rev 11814) @@ -36,12 +36,15 @@ 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");
