#include "auth/gensec/gensec_tstream.h"
#include "param/param.h"
#include "../lib/util/tevent_ntstatus.h"
+#include "lib/util/time_basic.h"
static char *ldapsrv_bind_error_msg(TALLOC_CTX *mem_ctx,
HRESULT hresult,
const char *errstr = NULL;
char *ldb_errstring = NULL;
DATA_BLOB output = data_blob_null;
+ NTTIME expire_time_nt;
status = gensec_update_recv(subreq, call, &output);
TALLOC_FREE(subreq);
goto do_reply;
}
+ expire_time_nt = gensec_expire_time(conn->gensec);
+ if (expire_time_nt != GENSEC_EXPIRE_TIME_INFINITY) {
+ struct timeval_buf buf;
+
+ nttime_to_timeval(&conn->limits.expire_time, expire_time_nt);
+
+ DBG_DEBUG("Setting connection expire_time to %s\n",
+ timeval_str_buf(&conn->limits.expire_time,
+ false,
+ true,
+ &buf));
+ }
+
if (context != NULL) {
const void *ptr = NULL;
#include "../lib/util/tevent_ntstatus.h"
#include "../libcli/util/tstream.h"
#include "libds/common/roles.h"
+#include "lib/util/time.h"
static void ldapsrv_terminate_connection_done(struct tevent_req *subreq);
conn->limits.max_page_size = 1000;
conn->limits.max_notifications = 5;
conn->limits.search_timeout = 120;
+ conn->limits.expire_time = (struct timeval) {
+ .tv_sec = get_time_t_max(),
+ };
tmp_ctx = talloc_new(conn);