summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--source4/scripting/ejs/smbcalls_auth.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/scripting/ejs/smbcalls_auth.c b/source4/scripting/ejs/smbcalls_auth.c
index 4739922e38c..87d5327e04f 100644
--- a/source4/scripting/ejs/smbcalls_auth.c
+++ b/source4/scripting/ejs/smbcalls_auth.c
@@ -102,6 +102,11 @@ static int ejs_userAuth(MprVarHandle eid, int argc, struct MprVar **argv)
domain = mprToString(mprGetProperty(argv[0], "domain", NULL));
remote_host = mprToString(mprGetProperty(argv[0], "rhost", NULL));
+ if (username == NULL || password == NULL || domain == NULL) {
+ mpr_Return(eid, mprCreateUndefinedVar());
+ return 0;
+ }
+
tmp_ctx = talloc_new(mprMemCtx());
auth = mprObject("auth");