summaryrefslogtreecommitdiff
path: root/source4/scripting/ejs/smbcalls_auth.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-07-12 05:53:51 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:20:08 -0500
commit9f86e202865807ed898eff684d7cf3be7daae0fc (patch)
tree3f00468ba059e780c51b611ae7ebf5dd0d608648 /source4/scripting/ejs/smbcalls_auth.c
parent1bb2b0603126188e639d7adb6309166c64b5e9df (diff)
downloadsamba-9f86e202865807ed898eff684d7cf3be7daae0fc.tar.gz
samba-9f86e202865807ed898eff684d7cf3be7daae0fc.tar.bz2
samba-9f86e202865807ed898eff684d7cf3be7daae0fc.zip
r8340: - added sys_gmtime()
- added sys_unlink() - added sys_file_load() and sys_file_save() - use mprString() instead of mprCreateStringVar() to cope with NULL strings - removed smbcalls_irpc.c as its not needed any more - allow ldbAdd() and ldbModify() to take multiple ldif records - added a sprintf() function to ejs. Quite complex, but very useful! (This used to be commit 625628a3f6e78349d2240ebcc79081f350672070)
Diffstat (limited to 'source4/scripting/ejs/smbcalls_auth.c')
-rw-r--r--source4/scripting/ejs/smbcalls_auth.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source4/scripting/ejs/smbcalls_auth.c b/source4/scripting/ejs/smbcalls_auth.c
index 089d4b6bea..81a7ee1bac 100644
--- a/source4/scripting/ejs/smbcalls_auth.c
+++ b/source4/scripting/ejs/smbcalls_auth.c
@@ -41,7 +41,7 @@ static int ejs_systemAuth(TALLOC_CTX *tmp_ctx, struct MprVar *auth, const char *
nt_status = auth_context_create(tmp_ctx, auth_unix, &auth_context, NULL);
if (!NT_STATUS_IS_OK(nt_status)) {
mprSetPropertyValue(auth, "result", mprCreateBoolVar(False));
- mprSetPropertyValue(auth, "report", mprCreateStringVar("Auth System Failure", 1));
+ mprSetPropertyValue(auth, "report", mprString("Auth System Failure"));
goto done;
}
@@ -58,13 +58,13 @@ static int ejs_systemAuth(TALLOC_CTX *tmp_ctx, struct MprVar *auth, const char *
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));
- mprSetPropertyValue(auth, "report", mprCreateStringVar("Login Failed", 1));
+ mprSetPropertyValue(auth, "report", mprString("Login Failed"));
goto done;
}
mprSetPropertyValue(auth, "result", mprCreateBoolVar(server_info->authenticated));
- mprSetPropertyValue(auth, "username", mprCreateStringVar(server_info->account_name, 1));
- mprSetPropertyValue(auth, "domain", mprCreateStringVar(server_info->domain_name, 1));
+ mprSetPropertyValue(auth, "username", mprString(server_info->account_name));
+ mprSetPropertyValue(auth, "domain", mprString(server_info->domain_name));
done:
return 0;
@@ -109,7 +109,7 @@ static int ejs_userAuth(MprVarHandle eid, int argc, struct MprVar **argv)
} else {
mprSetPropertyValue(&auth, "result", mprCreateBoolVar(False));
- mprSetPropertyValue(&auth, "report", mprCreateStringVar("Unknown Domain", 1));
+ mprSetPropertyValue(&auth, "report", mprString("Unknown Domain"));
}
mpr_Return(eid, auth);
@@ -127,7 +127,7 @@ static int ejs_domain_list(MprVarHandle eid, int argc, char **argv)
}
list = mprObject("list");
- mprSetVar(&list, "0", mprCreateStringVar("System User", 1));
+ mprSetVar(&list, "0", mprString("System User"));
mpr_Return(eid, list);