From 4e052d1fe472d8a60c76988c17d291c958ceb46d Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 1 Nov 2005 13:32:09 +0000 Subject: r11439: Make presedence on strcmp comparison clear, and fill in logon_parameters for the auth subsystem. Andrew Bartlett (This used to be commit 767c5ca7bec3737d1261e209cd895d1300354f25) --- source4/scripting/ejs/smbcalls_auth.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source4/scripting/ejs/smbcalls_auth.c b/source4/scripting/ejs/smbcalls_auth.c index 672694bbc5..ba20332aaa 100644 --- a/source4/scripting/ejs/smbcalls_auth.c +++ b/source4/scripting/ejs/smbcalls_auth.c @@ -72,6 +72,8 @@ static int ejs_doauth(TALLOC_CTX *tmp_ctx, struct MprVar *auth, const char *user user_info->flags = USER_INFO_CASE_INSENSITIVE_USERNAME | USER_INFO_DONT_CHECK_UNIX_ACCOUNT; + user_info->logon_parameters = 0; + nt_status = auth_check_password(auth_context, tmp_ctx, user_info, &server_info); if (!NT_STATUS_IS_OK(nt_status)) { mprSetPropertyValue(auth, "result", mprCreateBoolVar(False)); @@ -135,7 +137,7 @@ static int ejs_userAuth(MprVarHandle eid, int argc, struct MprVar **argv) auth = mprObject("auth"); - if (domain && strcmp("System User", domain) == 0) { + if (domain && (strcmp("System User", domain) == 0)) { ejs_doauth(tmp_ctx, &auth, username, password, domain, remote_host, "unix"); } else { ejs_doauth(tmp_ctx, &auth, username, password, domain, remote_host, "sam"); -- cgit