From 75ef0ba513489a85557cb486135d80286d620809 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 10 Jan 2006 10:35:47 +0000 Subject: r12823: Fix up the provison and newuser code in SWAT. This also cleans up the main provision script a bit, as the argument list was getting out of control. (It has been replaced in part with an object). This also returns the session_info from the auth code into ejs. We still need access control allowing only root to re-provision. Andrew Bartlett (This used to be commit 002cdcf3cab6563909d31edc5d825e857dc0a732) --- source4/scripting/ejs/smbcalls_auth.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source4/scripting/ejs') diff --git a/source4/scripting/ejs/smbcalls_auth.c b/source4/scripting/ejs/smbcalls_auth.c index a1310ded9c..5c70b6908b 100644 --- a/source4/scripting/ejs/smbcalls_auth.c +++ b/source4/scripting/ejs/smbcalls_auth.c @@ -35,6 +35,7 @@ static int ejs_doauth(MprVarHandle eid, struct auth_serversupplied_info *server_info = NULL; struct auth_session_info *session_info = NULL; struct auth_context *auth_context; + struct MprVar *session_info_obj; const char *auth_types[] = { authtype, NULL }; NTSTATUS nt_status; @@ -89,9 +90,12 @@ static int ejs_doauth(MprVarHandle eid, goto done; } + session_info_obj = mprInitObject(eid, "session_info", 0, NULL); + + mprSetPtrChild(session_info_obj, "session_info", session_info); talloc_steal(mprMemCtx(), session_info); - mprSetThisPtr(eid, "session_info", session_info); + mprSetProperty(auth, "session_info", session_info_obj); mprSetPropertyValue(auth, "result", mprCreateBoolVar(server_info->authenticated)); mprSetPropertyValue(auth, "username", mprString(server_info->account_name)); mprSetPropertyValue(auth, "domain", mprString(server_info->domain_name)); -- cgit