diff options
author | Simo Sorce <idra@samba.org> | 2005-06-04 08:54:07 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:17:34 -0500 |
commit | 791db4bf72f282840a7bfefa2a3ccf9b3191a6e6 (patch) | |
tree | ae05e1b37e4fa7ebde789ab81d91a763ec8736b6 | |
parent | b7bc13209f5133a117428f2ce58d995399fb684b (diff) | |
download | samba-791db4bf72f282840a7bfefa2a3ccf9b3191a6e6.tar.gz samba-791db4bf72f282840a7bfefa2a3ccf9b3191a6e6.tar.bz2 samba-791db4bf72f282840a7bfefa2a3ccf9b3191a6e6.zip |
r7268: allocate the strings to avoid them disappearing under our feet
(This used to be commit ddd7454cb3e2445fd32682b380be89c70f8a22cb)
-rw-r--r-- | source4/scripting/ejs/smbcalls.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source4/scripting/ejs/smbcalls.c b/source4/scripting/ejs/smbcalls.c index 3ca6003ee4..8ea5967ef4 100644 --- a/source4/scripting/ejs/smbcalls.c +++ b/source4/scripting/ejs/smbcalls.c @@ -83,7 +83,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); if (!NT_STATUS_IS_OK(nt_status)) { mprSetPropertyValue(auth, "result", mprCreateBoolVar(False)); - mprSetPropertyValue(auth, "report", mprCreateStringVar("Auth System Failure", 0)); + mprSetPropertyValue(auth, "report", mprCreateStringVar("Auth System Failure", 1)); goto done; } @@ -100,13 +100,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", 0)); + mprSetPropertyValue(auth, "report", mprCreateStringVar("Login Failed", 1)); goto done; } mprSetPropertyValue(auth, "result", mprCreateBoolVar(server_info->authenticated)); - mprSetPropertyValue(auth, "username", mprCreateStringVar(server_info->account_name, 0)); - mprSetPropertyValue(auth, "domain", mprCreateStringVar(server_info->domain_name, 0)); + mprSetPropertyValue(auth, "username", mprCreateStringVar(server_info->account_name, 1)); + mprSetPropertyValue(auth, "domain", mprCreateStringVar(server_info->domain_name, 1)); done: return 0; @@ -151,7 +151,7 @@ static int ejs_userAuth(MprVarHandle eid, int argc, struct MprVar **argv) } else { mprSetPropertyValue(&auth, "result", mprCreateBoolVar(False)); - mprSetPropertyValue(&auth, "report", mprCreateStringVar("Unknown Domain", 0)); + mprSetPropertyValue(&auth, "report", mprCreateStringVar("Unknown Domain", 1)); } done: |