*/
/**
- \file dcesrv_exchange_rfr.c
+ \file dcesrv_exchange_ds_rfr.c
\brief OpenChange RFR Server implementation
*/
#include "mapiproxy/dcesrv_mapiproxy.h"
-#include "mapiproxy/libmapiproxy.h"
#include "dcesrv_exchange_ds_rfr.h"
/**
const char *realm = NULL;
char *fqdn = NULL;
- DEBUG(3, ("exchange_ds_rfr: RfrGetNewDSA (0x0)\n"));
+ DEBUG(5, ("exchange_ds_rfr: RfrGetNewDSA (0x0)\n"));
+ /* HACK: Disable authentication */
/* Step 0. Ensure incoming user is authenticated */
- if (!NTLM_AUTH_IS_OK(dce_call)) {
- DEBUG(1, ("No challenge requested by client, cannot authenticate\n"));
-
- r->out.ppszUnused = NULL;
- r->out.ppszServer = NULL;
- r->out.result = MAPI_E_LOGON_FAILED;
- return MAPI_E_LOGON_FAILED;
- }
+// if (!dcesrv_call_authenticated(dce_call)) {
+// DEBUG(1, ("No challenge requested by client, cannot authenticate\n"));
+//
+// r->out.ppszUnused = NULL;
+// r->out.ppszServer = NULL;
+// r->out.result = MAPI_E_LOGON_FAILED;
+// return MAPI_E_LOGON_FAILED;
+// }
/* Step 1. We don't have load-balancing support yet, just return Samba FQDN name */
- netbiosname = lp_netbios_name(dce_call->conn->dce_ctx->lp_ctx);
- realm = lp_realm(dce_call->conn->dce_ctx->lp_ctx);
+ netbiosname = lpcfg_netbios_name(dce_call->conn->dce_ctx->lp_ctx);
+ realm = lpcfg_realm(dce_call->conn->dce_ctx->lp_ctx);
if (!netbiosname || !realm) {
r->out.ppszUnused = NULL;
r->out.ppszServer = NULL;
TALLOC_CTX *mem_ctx,
struct RfrGetFQDNFromLegacyDN *r)
{
- DEBUG(3, ("exchange_ds_rfr: RfrGetFQDNFromLegacyDN (0x1) not implemented\n"));
- DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
+ char *fqdn;
+ const char *netbiosname;
+ const char *realm;
+
+ DEBUG(3, ("exchange_ds_rfr: RfrGetFQDNFromLegacyDN (0x1)\n"));
+
+// if (!dcesrv_call_authenticated(dce_call)) {
+// DEBUG(1, ("No challenge requested by client, cannot authenticate\n"));
+
+// failure:
+// r->out.ppszServerFQDN = talloc_array(mem_ctx, const char *, 2);
+// r->out.ppszServerFQDN[0] = NULL;
+// r->out.result = MAPI_E_LOGON_FAILED;
+// return MAPI_E_LOGON_FAILED;
+// }
+
+// netbiosname = lpcfg_netbios_name(dce_call->conn->dce_ctx->lp_ctx);
+// realm = lpcfg_realm(dce_call->conn->dce_ctx->lp_ctx);
+// if (!netbiosname || !realm) {
+// goto failure;
+// }
+
+ fqdn = talloc_asprintf(mem_ctx, "%s.%s", netbiosname, realm);
+ r->out.ppszServerFQDN = talloc_array(mem_ctx, const char *, 2);
+ r->out.ppszServerFQDN[0] = strlower_talloc(mem_ctx, fqdn);
+ talloc_free(fqdn);
+ r->out.result = MAPI_E_SUCCESS;
+
+ return MAPI_E_SUCCESS;
}
const struct ndr_interface_table *table;
uint16_t opnum;
- table = (const struct ndr_interface_table *) dce_call->context->iface->private;
+ table = (const struct ndr_interface_table *) dce_call->context->iface->private_data;
opnum = dce_call->pkt.u.request.opnum;
/* Sanity checks */