mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
r9499: added error checking to the userAuth() call. SWAT is still failing, but at least it now
tells us why (This used to be commit 4afb16d7b24b1d1ed359048a89950924b363e44a)
This commit is contained in:
parent
f5f18f2d18
commit
185adae2f9
@ -105,7 +105,7 @@ static int ejs_userAuth(MprVarHandle eid, int argc, struct MprVar **argv)
|
||||
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 @@ static int ejs_userAuth(MprVarHandle eid, int argc, struct MprVar **argv)
|
||||
|
||||
/* 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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user