#include "includes.h"
#include "ldap_server/ldap_server.h"
#include "dlinklist.h"
-#include "libcli/ldap/ldap.h"
struct ldapsrv_reply *ldapsrv_init_reply(struct ldapsrv_call *call, uint8_t type)
return NULL;
}
- reply->prev = reply->next = NULL;
- reply->state = LDAPSRV_REPLY_STATE_NEW;
reply->msg->messageid = call->request->messageid;
reply->msg->type = type;
return reply;
}
-NTSTATUS ldapsrv_queue_reply(struct ldapsrv_call *call, struct ldapsrv_reply *reply)
+void ldapsrv_queue_reply(struct ldapsrv_call *call, struct ldapsrv_reply *reply)
{
DLIST_ADD_END(call->replies, reply, struct ldapsrv_reply *);
- return NT_STATUS_OK;
}
struct ldapsrv_partition *ldapsrv_get_partition(struct ldapsrv_connection *conn, const char *dn, uint8_t scope)
{
- if (scope == LDAP_SEARCH_SCOPE_BASE
- && strcasecmp("", dn) == 0) {
- return conn->service->rootDSE;
- }
-
- return conn->service->default_partition;
+ return conn->default_partition;
}
NTSTATUS ldapsrv_unwilling(struct ldapsrv_call *call, int error)
r->value.data = NULL;
r->value.length = 0;
- return ldapsrv_queue_reply(call, reply);
+ ldapsrv_queue_reply(call, reply);
+ return NT_STATUS_OK;
}
static NTSTATUS ldapsrv_SearchRequest(struct ldapsrv_call *call)
done->errormessage = NULL;
done->referral = NULL;
- return ldapsrv_queue_reply(call, done_r);
+ ldapsrv_queue_reply(call, done_r);
+ return NT_STATUS_OK;
}
return part->ops->Search(part, call, req);
ZERO_STRUCT(reply->msg->r);
- return ldapsrv_queue_reply(call, reply);
+ ldapsrv_queue_reply(call, reply);
+ return NT_STATUS_OK;
}
NTSTATUS ldapsrv_do_call(struct ldapsrv_call *call)
return ldapsrv_unwilling(call, 2);
}
}
+
+