mapiproxy: update to match recent samba fixes.
authorBrad Hards <bradh@openchange.org>
Wed, 4 May 2011 02:47:43 +0000 (02:47 +0000)
committerBrad Hards <bradh@openchange.org>
Wed, 4 May 2011 02:47:43 +0000 (02:47 +0000)
Unfortunately this breaks compatibility with Samba4
alpha15.

mapiproxy/dcesrv_mapiproxy.c
mapiproxy/dcesrv_mapiproxy_nspi.c
mapiproxy/dcesrv_mapiproxy_rfr.c
mapiproxy/libmapiproxy/dcesrv_mapiproxy_session.c
mapiproxy/libmapistore/database/mapistoredb.c
mapiproxy/modules/mpm_cache.h

index 65d743ba7343f11f2853904ec5443bb74ae9657b..a1bd7ebd8c58073115e9641509e8906189a9bb02 100644 (file)
@@ -222,7 +222,7 @@ static NTSTATUS mapiproxy_op_bind(struct dcesrv_call_state *dce_call, const stru
        bool                                    server_mode;
 
        DEBUG(5, ("mapiproxy::mapiproxy_op_bind: [session = 0x%x] [session server id = 0x%"PRIx64" 0x%x 0x%x]\n", dce_call->context->context_id,
-                 dce_call->conn->server_id.id, dce_call->conn->server_id.id2, dce_call->conn->server_id.node));
+                 dce_call->conn->server_id.pid, dce_call->conn->server_id.id2, dce_call->conn->server_id.vnn));
 
        /* Retrieve server mode parametric option */
        server_mode = lpcfg_parm_bool(dce_call->conn->dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "server", false);
index 2148dedf9b6f9fc156382ae3949c36f3fcdd480d..f1046fcd8a3f45be9e58abe46d95a81d1be9d0a8 100644 (file)
@@ -104,7 +104,7 @@ bool mapiproxy_NspiGetProps(struct dcesrv_call_state *dce_call, struct NspiGetPr
        slpstr->lppszA[0] = talloc_asprintf(dce_call, "ncacn_ip_tcp:%s.%s", 
                                            lpcfg_netbios_name(dce_call->conn->dce_ctx->lp_ctx), 
                                            lpcfg_realm(dce_call->conn->dce_ctx->lp_ctx));
-       strlower_m((char *)slpstr->lppszA[0]);
+       slpstr->lppszA[0] = strlower_talloc(dce_call, slpstr->lppszA[0]);
 
        return true;
 }
index bc8fde4db1d2c0040e7cb077f6d1c88c0303ebf6..1473887996ac1c3c977ea9f3a987f1c7a68c3276 100644 (file)
@@ -43,7 +43,7 @@ bool mapiproxy_RfrGetNewDSA(struct dcesrv_call_state *dce_call, struct RfrGetNew
        *r->out.ppszServer = talloc_asprintf(dce_call, "%s.%s", 
                                             lpcfg_netbios_name(dce_call->conn->dce_ctx->lp_ctx), 
                                             lpcfg_realm(dce_call->conn->dce_ctx->lp_ctx));
-       strlower_m((char *)*r->out.ppszServer);
+       *r->out.ppszServer = strlower_talloc(dce_call, *r->out.ppszServer);
 
        return true;
 }
index ca44d7d4091d81b6f1bc532680755704c0e58e0b..9eeeadec6ebe81d96bc28cfe4c22a7a859f0f41f 100644 (file)
@@ -51,9 +51,9 @@ struct mpm_session *mpm_session_new(TALLOC_CTX *mem_ctx,
        session = talloc_zero(mem_ctx, struct mpm_session);
        if (!session) return NULL;
 
-       session->server_id.id = serverid.id;
+       session->server_id.pid = serverid.pid;
        session->server_id.id2 = serverid.id2;
-       session->server_id.node = serverid.node;
+       session->server_id.vnn = serverid.vnn;
        session->context_id = context_id;
        session->ref_count = 0;
        session->destructor = NULL;
@@ -183,9 +183,9 @@ bool mpm_session_cmp_sub(struct mpm_session *session,
 {
        if (!session) return false;
 
-       if ((session->server_id.id   == sid.id) &&
-           (session->server_id.id2  == sid.id2) &&
-           (session->server_id.node == sid.node) &&
+       if ((session->server_id.pid == sid.pid) &&
+           (session->server_id.id2 == sid.id2) &&
+           (session->server_id.vnn == sid.vnn) &&
            (session->context_id == context_id)) {
                return true;
        }
index 250990df1a5e53f71810c524d3de12f4263b6925..fcdcc85839fc7a7bd7eedad136e930c433ecd46f 100644 (file)
@@ -73,15 +73,20 @@ struct mapistoredb_context *mapistoredb_new(TALLOC_CTX *mem_ctx)
 
        switch (lpcfg_server_role(mdb_ctx->lp_ctx)) {
        case ROLE_DOMAIN_CONTROLLER:
+       {
+               char *el_lower;
                domaindn = str_list_make(mdb_ctx->param, mdb_ctx->param->dnsdomain, ".");
-               strlower_m(domaindn[0]);
-               mdb_ctx->param->domaindn = talloc_asprintf(mdb_ctx->param, "DC=%s", domaindn[0]);
+               el_lower = strlower_talloc(mem_ctx, domaindn[0]);
+               mdb_ctx->param->domaindn = talloc_asprintf(mdb_ctx->param, "DC=%s", el_lower);
+               talloc_free(el_lower);
                for (i = 1; domaindn[i]; i++) {
-                       strlower_m(domaindn[i]);
-                       mdb_ctx->param->domaindn = talloc_asprintf_append_buffer(mdb_ctx->param->domaindn, ",DC=%s", domaindn[i]);
+                       el_lower = strlower_talloc(mem_ctx, domaindn[i]);
+                       mdb_ctx->param->domaindn = talloc_asprintf_append_buffer(mdb_ctx->param->domaindn, ",DC=%s", el_lower);
+                       talloc_free(el_lower);
                }
                talloc_free(domaindn);
                break;
+       }
        default:
                mdb_ctx->param->domaindn = talloc_asprintf(mdb_ctx->param, "CN=%s", mdb_ctx->param->domain);
                break;
index f45ced669cd63f1f9c1ae2b4fef4ef956c0b9af3..e0693151813dec5df7be5a36e9d628109afbc4dd 100644 (file)
@@ -119,6 +119,6 @@ __END_DECLS
 #define        MPM_DB_STORAGE  "data"
 
 #define        MPM_LOCATION    __FUNCTION__, __LINE__
-#define        MPM_SESSION(x)  x->session->server_id.id, x->session->server_id.id2, x->session->server_id.node, x->session->context_id
+#define        MPM_SESSION(x)  x->session->server_id.pid, x->session->server_id.id2, x->session->server_id.vnn, x->session->context_id
 
 #endif /* __MPM_CACHE_H */