summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-07-20 05:41:29 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:29:46 -0500
commitd6c20a5c8a50338535efcf41fb8cb1f8dcf87757 (patch)
tree95086d3ef47e83a337edbb911d9e9128cba504a0
parent53ffd147bd15577ba87f7bef7db66d592066ed27 (diff)
downloadsamba-d6c20a5c8a50338535efcf41fb8cb1f8dcf87757.tar.gz
samba-d6c20a5c8a50338535efcf41fb8cb1f8dcf87757.tar.bz2
samba-d6c20a5c8a50338535efcf41fb8cb1f8dcf87757.zip
r8633: check for valid input to ejs_userAuth()
(This used to be commit 8e788ae3094220e5ea195cdf85abb6763a834abd)
-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 4739922e38..87d5327e04 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");