r12822: Given that talloc gives us this extra level of safety, use it.
authorAndrew Bartlett <abartlet@samba.org>
Tue, 10 Jan 2006 09:43:00 +0000 (09:43 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:50:02 +0000 (13:50 -0500)
Andrew Bartlett
(This used to be commit a6028558dc19b0d105b1bfe4126a2b24afaf8dd2)

source4/scripting/ejs/smbcalls_ldb.c

index 39698947d7be59905fac8c53e7e6da27aa47d8e8..1a224605eecb0283cff143ad65955125e0252afa 100644 (file)
@@ -399,12 +399,12 @@ static int ejs_ldbConnect(MprVarHandle eid, int argc, char **argv)
 
        credentials = mprGetProperty(this, "credentials", NULL);
        if (credentials) {
-               creds = mprGetPtr(credentials, "creds");
+               creds = talloc_get_type(mprGetPtr(credentials, "creds"), struct cli_credentials);
        }
 
        session = mprGetProperty(this, "session_info", NULL);
        if (session) {
-               session_info = mprGetPtr(session, "session_info");
+               session_info = talloc_get_type(mprGetPtr(session, "session_info"), struct auth_session_info);
        }
 
        dbfile = argv[0];