diff options
author | Rafal Szczesniak <mimir@samba.org> | 2005-11-20 21:40:41 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:46:32 -0500 |
commit | 9aef045b2719e85fa2ede826b0b4fa2e592eab02 (patch) | |
tree | 03ebba871094fd2137d159ac6835d3e5672d3681 /source4 | |
parent | 78a328bef894a78881dfae9f278dd839b86fc82f (diff) | |
download | samba-9aef045b2719e85fa2ede826b0b4fa2e592eab02.tar.gz samba-9aef045b2719e85fa2ede826b0b4fa2e592eab02.tar.bz2 samba-9aef045b2719e85fa2ede826b0b4fa2e592eab02.zip |
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)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/scripting/ejs/ejsnet.c | 5 |
1 files changed, 4 insertions, 1 deletions
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"); |