svn commit: samba r9499 - in branches/SAMBA_4_0/source/scripting/ejs: .

tridge at samba.org tridge at samba.org
Tue Aug 23 02:05:53 GMT 2005


Author: tridge
Date: 2005-08-23 02:05:53 +0000 (Tue, 23 Aug 2005)
New Revision: 9499

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=9499

Log:

added error checking to the userAuth() call. SWAT is still failing, but at least it now
tells us why

Modified:
   branches/SAMBA_4_0/source/scripting/ejs/smbcalls_auth.c


Changeset:
Modified: branches/SAMBA_4_0/source/scripting/ejs/smbcalls_auth.c
===================================================================
--- branches/SAMBA_4_0/source/scripting/ejs/smbcalls_auth.c	2005-08-23 02:00:43 UTC (rev 9498)
+++ branches/SAMBA_4_0/source/scripting/ejs/smbcalls_auth.c	2005-08-23 02:05:53 UTC (rev 9499)
@@ -105,7 +105,7 @@
 	const char *password;
 	const char *domain;
 	const char *remote_host;
-	struct MprVar auth, *creds_obj;
+	struct MprVar auth;
 	struct cli_credentials *creds;
 
 	if (argc != 1 || argv[0]->type != MPR_TYPE_OBJECT) {
@@ -115,6 +115,10 @@
 
 	/* get credential values from credentials object */
 	creds = mprGetPtr(argv[0], "creds");
+	if (creds == NULL) {
+		ejsSetErrorMsg(eid, "userAuth requires a 'creds' element");
+		return -1;
+	}
 	username    = cli_credentials_get_username(creds);
 	password    = cli_credentials_get_password(creds);
 	domain      = cli_credentials_get_domain(creds);



More information about the samba-cvs mailing list